C# Class RocksmithToolkitLib.Extensions.StringExtensions

Datei anzeigen Open project: rscustom/rocksmith-custom-song-toolkit

Public Methods

Method Description
Capitalize ( this value ) : string

Capitalize the first character without changing the rest of the string

GetValidAcronym ( this value ) : string
GetValidAppIdSixDigits ( this value ) : string
GetValidAtaSpaceName ( this value ) : string

Gets a valid Artist, Title, Album (ATA) name with spaces

GetValidFileName ( this fileName ) : string
GetValidFilePath ( this value ) : string
GetValidInlayName ( this value, bool frets24 = false ) : string
GetValidKey ( this value, string songTitle = "" ) : string

Format string as valid DLCKey (aka SongKey), or ToneKey

GetValidPathName ( this pathName ) : string
GetValidShortFileName ( string artist, string title, string version, bool acronym = false ) : string

Standard short file name format for CDLC file names "{0}_{1}_{2}"

GetValidSortableName ( this value ) : string
GetValidTempo ( this value ) : string
GetValidVersion ( this value ) : string
GetValidYear ( this value ) : string
IsAppIdSixDigits ( this value ) : bool
IsFilePathLengthValid ( this filePath ) : bool
IsFilePathNameValid ( this filePath ) : bool
IsFilePathValid ( this filePath ) : bool
ReplaceAbbreviations ( this value ) : string
ReplaceDiacritics ( this value ) : string
ReplaceDiacriticsFast ( this value ) : string
ReplaceSpaceWith ( this value, string replacementValue = "_" ) : string

Replace white space with user choice of replacement or remove all together

ShortWordMover ( this value, bool undoIt = false ) : string

Moves short words like "The " from the begining of a string to the end ", The"

StripDiacritics ( this value ) : string
StripExcessWhiteSpace ( this value ) : string
StripIllegalXMLChars ( this filePath ) : System.Stream

Strips non-printable ASCII characters

StripLeadingNumbers ( this value ) : string
StripLeadingSpecialCharacters ( this value ) : string
StripNonAlpaNumeric ( this value ) : string
StripPlatformEndName ( this filePath ) : string
StripSpecialCharacters ( this value ) : string
ToNullTerminatedAscii ( this bytes ) : string
ToNullTerminatedUTF8 ( this bytes ) : string

Private Methods

Method Description
ObsoleteGetValidName ( this value, bool allowSpace = false, bool allowStartsWithNumber = false, bool underscoreSpace = false, bool frets24 = false ) : string

Method Details

Capitalize() public static method

Capitalize the first character without changing the rest of the string
public static Capitalize ( this value ) : string
value this
return string

GetValidAcronym() public static method

public static GetValidAcronym ( this value ) : string
value this
return string

GetValidAppIdSixDigits() public static method

public static GetValidAppIdSixDigits ( this value ) : string
value this
return string

GetValidAtaSpaceName() public static method

Gets a valid Artist, Title, Album (ATA) name with spaces
public static GetValidAtaSpaceName ( this value ) : string
value this
return string

GetValidFileName() public static method

public static GetValidFileName ( this fileName ) : string
fileName this
return string

GetValidFilePath() public static method

public static GetValidFilePath ( this value ) : string
value this
return string

GetValidInlayName() public static method

public static GetValidInlayName ( this value, bool frets24 = false ) : string
value this
frets24 bool
return string

GetValidKey() public static method

Format string as valid DLCKey (aka SongKey), or ToneKey
public static GetValidKey ( this value, string songTitle = "" ) : string
value this DLCKey or ToneKey for verification
songTitle string optional SongTitle varification comparison for DLCKey
return string

GetValidPathName() public static method

public static GetValidPathName ( this pathName ) : string
pathName this
return string

GetValidShortFileName() public static method

Standard short file name format for CDLC file names "{0}_{1}_{2}"
public static GetValidShortFileName ( string artist, string title, string version, bool acronym = false ) : string
artist string
title string
version string
acronym bool use artist acronym instead of full artist name
return string

GetValidSortableName() public static method

public static GetValidSortableName ( this value ) : string
value this
return string

GetValidTempo() public static method

public static GetValidTempo ( this value ) : string
value this
return string

GetValidVersion() public static method

public static GetValidVersion ( this value ) : string
value this
return string

GetValidYear() public static method

public static GetValidYear ( this value ) : string
value this
return string

IsAppIdSixDigits() public static method

public static IsAppIdSixDigits ( this value ) : bool
value this
return bool

IsFilePathLengthValid() public static method

public static IsFilePathLengthValid ( this filePath ) : bool
filePath this
return bool

IsFilePathNameValid() public static method

public static IsFilePathNameValid ( this filePath ) : bool
filePath this
return bool

IsFilePathValid() public static method

public static IsFilePathValid ( this filePath ) : bool
filePath this
return bool

ReplaceAbbreviations() public static method

public static ReplaceAbbreviations ( this value ) : string
value this
return string

ReplaceDiacritics() public static method

public static ReplaceDiacritics ( this value ) : string
value this
return string

ReplaceDiacriticsFast() public static method

public static ReplaceDiacriticsFast ( this value ) : string
value this
return string

ReplaceSpaceWith() public static method

Replace white space with user choice of replacement or remove all together
public static ReplaceSpaceWith ( this value, string replacementValue = "_" ) : string
value this
replacementValue string Default is underscore
return string

ShortWordMover() public static method

Moves short words like "The " from the begining of a string to the end ", The"
public static ShortWordMover ( this value, bool undoIt = false ) : string
value this
undoIt bool Use to undo ShortWordMover strings
return string

StripDiacritics() public static method

public static StripDiacritics ( this value ) : string
value this
return string

StripExcessWhiteSpace() public static method

public static StripExcessWhiteSpace ( this value ) : string
value this
return string

StripIllegalXMLChars() public static method

Strips non-printable ASCII characters
public static StripIllegalXMLChars ( this filePath ) : System.Stream
filePath this Full path to the File
return System.Stream

StripLeadingNumbers() public static method

public static StripLeadingNumbers ( this value ) : string
value this
return string

StripLeadingSpecialCharacters() public static method

public static StripLeadingSpecialCharacters ( this value ) : string
value this
return string

StripNonAlpaNumeric() public static method

public static StripNonAlpaNumeric ( this value ) : string
value this
return string

StripPlatformEndName() public static method

public static StripPlatformEndName ( this filePath ) : string
filePath this
return string

StripSpecialCharacters() public static method

public static StripSpecialCharacters ( this value ) : string
value this
return string

ToNullTerminatedAscii() public static method

public static ToNullTerminatedAscii ( this bytes ) : string
bytes this
return string

ToNullTerminatedUTF8() public static method

public static ToNullTerminatedUTF8 ( this bytes ) : string
bytes this
return string