C# 클래스 Faker.Extensions.StringExtensions

A collection of string helper extensions.
파일 보기 프로젝트 열기: AdmiringWorm/Faker.NET.Portable

공개 메소드들

메소드 설명
AlphanumericOnly ( this s ) : string

Removes all characters which is not Alphanumeric from the specified source

Capitalise ( this s ) : string

Capitalizes the first letter of the given string.

Letterify ( this s ) : string

Get a string with every '?' replaced with a random character from the english alphabet.

Numerify ( this s ) : string

Get a string with every occurrence of '#' replaced with a random number.

Transform ( this s, bool replaceVariables = false ) : string

Transforms the specified source and conditionally replaces variables.

비공개 메소드들

메소드 설명
AddVariables ( Type classType, IDictionary validVariables ) : void
FormatCulture ( [ format ) : string
FormatInvariant ( [ format ) : string
GetVariable ( string chars, int &index ) : string
GetVariableValue ( string chars, int &index ) : string
Numerify ( this s, bool replaceVariables ) : string

Transform the string replacing # placeholders into a number. Also replaces variables if replaceVariables is set to .

RemoveAccent ( string source ) : string
StringExtensions ( ) : System
Transform ( string s, bool letterify, bool numerify, bool replaceVariables ) : IEnumerable

메소드 상세

AlphanumericOnly() 공개 정적인 메소드

Removes all characters which is not Alphanumeric from the specified source
public static AlphanumericOnly ( this s ) : string
s this The source string.
리턴 string

Capitalise() 공개 정적인 메소드

Capitalizes the first letter of the given string.
public static Capitalise ( this s ) : string
s this The source string.
리턴 string

Letterify() 공개 정적인 메소드

Get a string with every '?' replaced with a random character from the english alphabet.
public static Letterify ( this s ) : string
s this The source format
리턴 string

Numerify() 공개 정적인 메소드

Get a string with every occurrence of '#' replaced with a random number.
public static Numerify ( this s ) : string
s this The source format.
리턴 string

Transform() 공개 정적인 메소드

Transforms the specified source and conditionally replaces variables.
public static Transform ( this s, bool replaceVariables = false ) : string
s this The s.
replaceVariables bool /// if set to replace variables in the string. ///
리턴 string