C# Class nHydrate.Generator.Common.Util.StringHelper

Afficher le fichier Open project: nHydrate/nHydrate

Méthodes publiques

Méthode Description
ByteArrayToHexString ( byte bytes ) : string
ByteArrayToString ( byte byteArray ) : string
ByteArrayToString ( byte byteArray, Encoding encoder ) : string
ByteArrayToString ( byte byteArray, int length ) : string
CamelCaseToDatabase ( string camelCase ) : string
ConvertTextToSingleLineCodeString ( string text ) : string

Convert the specified text to a single line text

ConvertTextToSingleLineCodeString ( string text, bool convertBreaks ) : string

Convert the specified text to a single line text

DatabaseNameToCamelCase ( string databaseName ) : string
DatabaseNameToPascalCase ( string databaseName ) : string
EnsureDirectorySeperatorAtEnd ( string directory ) : string
FirstCharToLower ( string inputString ) : string
FirstCharToUpper ( string inputString ) : string
GuidTryParse ( string s, System.Guid &result ) : bool
LineBreakCode ( StringBuilder sb, string text, string prepend ) : void

Given text prepend the specified prefix and add each line to a string builder

MakeValidCamelCaseVariableName ( string inputString ) : string
MakeValidDatabaseCaseVariableName ( string inputString ) : string
MakeValidPascalCaseVariableName ( string inputString ) : string
Match ( object s1, string s2, bool ignoreCase ) : bool
Match ( string s1, string s2 ) : bool
Match ( string s1, string s2, bool ignoreCase ) : bool
MemoryStreamToString ( MemoryStream memStream ) : String
PascalCaseToDatabase ( string pascalCase ) : string
StringReplace ( string text, string oldValue, string newValue ) : string

Case Insensitive String Replace

StringToByteArray ( string str ) : Byte[]
StringToMemoryStream ( string str ) : MemoryStream
WriteGeneratedCommentSection ( int tabCount, StringBuilder writer, string text ) : void

Take the specified text and break it into lines and write it as a C# comment

Private Methods

Méthode Description
ReplaceWithUpper ( Match m ) : string
StringHelper ( ) : System

Method Details

ByteArrayToHexString() public static méthode

public static ByteArrayToHexString ( byte bytes ) : string
bytes byte
Résultat string

ByteArrayToString() public static méthode

public static ByteArrayToString ( byte byteArray ) : string
byteArray byte
Résultat string

ByteArrayToString() public static méthode

public static ByteArrayToString ( byte byteArray, Encoding encoder ) : string
byteArray byte
encoder System.Text.Encoding
Résultat string

ByteArrayToString() public static méthode

public static ByteArrayToString ( byte byteArray, int length ) : string
byteArray byte
length int
Résultat string

CamelCaseToDatabase() public static méthode

public static CamelCaseToDatabase ( string camelCase ) : string
camelCase string
Résultat string

ConvertTextToSingleLineCodeString() public static méthode

Convert the specified text to a single line text
public static ConvertTextToSingleLineCodeString ( string text ) : string
text string
Résultat string

ConvertTextToSingleLineCodeString() public static méthode

Convert the specified text to a single line text
public static ConvertTextToSingleLineCodeString ( string text, bool convertBreaks ) : string
text string
convertBreaks bool
Résultat string

DatabaseNameToCamelCase() public static méthode

public static DatabaseNameToCamelCase ( string databaseName ) : string
databaseName string
Résultat string

DatabaseNameToPascalCase() public static méthode

public static DatabaseNameToPascalCase ( string databaseName ) : string
databaseName string
Résultat string

EnsureDirectorySeperatorAtEnd() public static méthode

public static EnsureDirectorySeperatorAtEnd ( string directory ) : string
directory string
Résultat string

FirstCharToLower() public static méthode

public static FirstCharToLower ( string inputString ) : string
inputString string
Résultat string

FirstCharToUpper() public static méthode

public static FirstCharToUpper ( string inputString ) : string
inputString string
Résultat string

GuidTryParse() public static méthode

public static GuidTryParse ( string s, System.Guid &result ) : bool
s string
result System.Guid
Résultat bool

LineBreakCode() public static méthode

Given text prepend the specified prefix and add each line to a string builder
public static LineBreakCode ( StringBuilder sb, string text, string prepend ) : void
sb StringBuilder The StringBuilder to which to add the processed lines
text string The text to break into lines
prepend string The text to prepend each line
Résultat void

MakeValidCamelCaseVariableName() public static méthode

public static MakeValidCamelCaseVariableName ( string inputString ) : string
inputString string
Résultat string

MakeValidDatabaseCaseVariableName() public static méthode

public static MakeValidDatabaseCaseVariableName ( string inputString ) : string
inputString string
Résultat string

MakeValidPascalCaseVariableName() public static méthode

public static MakeValidPascalCaseVariableName ( string inputString ) : string
inputString string
Résultat string

Match() public static méthode

public static Match ( object s1, string s2, bool ignoreCase ) : bool
s1 object
s2 string
ignoreCase bool
Résultat bool

Match() public static méthode

public static Match ( string s1, string s2 ) : bool
s1 string
s2 string
Résultat bool

Match() public static méthode

public static Match ( string s1, string s2, bool ignoreCase ) : bool
s1 string
s2 string
ignoreCase bool
Résultat bool

MemoryStreamToString() public static méthode

public static MemoryStreamToString ( MemoryStream memStream ) : String
memStream System.IO.MemoryStream
Résultat String

PascalCaseToDatabase() public static méthode

public static PascalCaseToDatabase ( string pascalCase ) : string
pascalCase string
Résultat string

StringReplace() public static méthode

Case Insensitive String Replace
public static StringReplace ( string text, string oldValue, string newValue ) : string
text string
oldValue string
newValue string
Résultat string

StringToByteArray() public static méthode

public static StringToByteArray ( string str ) : Byte[]
str string
Résultat Byte[]

StringToMemoryStream() public static méthode

public static StringToMemoryStream ( string str ) : MemoryStream
str string
Résultat System.IO.MemoryStream

WriteGeneratedCommentSection() public static méthode

Take the specified text and break it into lines and write it as a C# comment
public static WriteGeneratedCommentSection ( int tabCount, StringBuilder writer, string text ) : void
tabCount int The number of preceding tabs
writer StringBuilder The string builder to write the text
text string The text to process
Résultat void