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

Mostrar archivo Open project: nHydrate/nHydrate

Public Methods

Method 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

Method Description
ReplaceWithUpper ( Match m ) : string
StringHelper ( ) : System

Method Details

ByteArrayToHexString() public static method

public static ByteArrayToHexString ( byte bytes ) : string
bytes byte
return string

ByteArrayToString() public static method

public static ByteArrayToString ( byte byteArray ) : string
byteArray byte
return string

ByteArrayToString() public static method

public static ByteArrayToString ( byte byteArray, Encoding encoder ) : string
byteArray byte
encoder System.Text.Encoding
return string

ByteArrayToString() public static method

public static ByteArrayToString ( byte byteArray, int length ) : string
byteArray byte
length int
return string

CamelCaseToDatabase() public static method

public static CamelCaseToDatabase ( string camelCase ) : string
camelCase string
return string

ConvertTextToSingleLineCodeString() public static method

Convert the specified text to a single line text
public static ConvertTextToSingleLineCodeString ( string text ) : string
text string
return string

ConvertTextToSingleLineCodeString() public static method

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

DatabaseNameToCamelCase() public static method

public static DatabaseNameToCamelCase ( string databaseName ) : string
databaseName string
return string

DatabaseNameToPascalCase() public static method

public static DatabaseNameToPascalCase ( string databaseName ) : string
databaseName string
return string

EnsureDirectorySeperatorAtEnd() public static method

public static EnsureDirectorySeperatorAtEnd ( string directory ) : string
directory string
return string

FirstCharToLower() public static method

public static FirstCharToLower ( string inputString ) : string
inputString string
return string

FirstCharToUpper() public static method

public static FirstCharToUpper ( string inputString ) : string
inputString string
return string

GuidTryParse() public static method

public static GuidTryParse ( string s, System.Guid &result ) : bool
s string
result System.Guid
return bool

LineBreakCode() public static method

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
return void

MakeValidCamelCaseVariableName() public static method

public static MakeValidCamelCaseVariableName ( string inputString ) : string
inputString string
return string

MakeValidDatabaseCaseVariableName() public static method

public static MakeValidDatabaseCaseVariableName ( string inputString ) : string
inputString string
return string

MakeValidPascalCaseVariableName() public static method

public static MakeValidPascalCaseVariableName ( string inputString ) : string
inputString string
return string

Match() public static method

public static Match ( object s1, string s2, bool ignoreCase ) : bool
s1 object
s2 string
ignoreCase bool
return bool

Match() public static method

public static Match ( string s1, string s2 ) : bool
s1 string
s2 string
return bool

Match() public static method

public static Match ( string s1, string s2, bool ignoreCase ) : bool
s1 string
s2 string
ignoreCase bool
return bool

MemoryStreamToString() public static method

public static MemoryStreamToString ( MemoryStream memStream ) : String
memStream System.IO.MemoryStream
return String

PascalCaseToDatabase() public static method

public static PascalCaseToDatabase ( string pascalCase ) : string
pascalCase string
return string

StringReplace() public static method

Case Insensitive String Replace
public static StringReplace ( string text, string oldValue, string newValue ) : string
text string
oldValue string
newValue string
return string

StringToByteArray() public static method

public static StringToByteArray ( string str ) : Byte[]
str string
return Byte[]

StringToMemoryStream() public static method

public static StringToMemoryStream ( string str ) : MemoryStream
str string
return System.IO.MemoryStream

WriteGeneratedCommentSection() public static method

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
return void