StringExtensions Class

Summary

A collection of string helper extensions.
Namespace
Faker.Extensions
Base Types
  • object
graph TD Base0["object"]-->Type Type["StringExtensions"] class Type type-node

Syntax

public static class StringExtensions

Methods

Name Value Summary
AlphanumericOnly(string) string
Removes all characters which is not Alphanumeric from the specified s
static
Capitalise(string) string
Capitalizes the first letter of the given string.
static
FormatCulture(string, object[]) string
Helper function for formatting a string with the current System.Globalization.CultureInfo
static
FormatInvariant(string, object[]) string
Helper function for formatting string with an invariant System.Globalization.CultureInfo.
static
Letterify(string) string
Get a string with every '?' replaced with a random character from the english alphabet.
static
Numerify(string) string
Get a string with every occurrence of '#' replaced with a random number.
static
Transform(string, bool) string
Transforms the specified source and conditionally replaces variables.
static
GitHub