Class StringUtils
A class to hold System.String related functions.
Inheritance
Inherited Members
Namespace: LLBML.Utils
Assembly: LLBModdingLib.dll
Syntax
public static class StringUtils
Fields
characterNames
Mapping from Character to System.String for character names.
Declaration
public static Dictionary<Character, string> characterNames
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<Character, System.String> |
regularStagesNames
Mapping from LLHandlers.Stage to System.String for regular stages names.
Declaration
public static Dictionary<Stage, string> regularStagesNames
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<LLHandlers.Stage, System.String> |
retroStagesNames
Mapping from LLHandlers.Stage to System.String for retro stages names.
Declaration
public static Dictionary<Stage, string> retroStagesNames
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<LLHandlers.Stage, System.String> |
Methods
BytesToHexString(Byte[])
Converts a byte array to a hex string representation array.
Declaration
public static string BytesToHexString(byte[] input)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | input | The byte array to convert. |
Returns
| Type | Description |
|---|---|
| System.String |
BytesToStrings(Byte[])
Converts a byte array to a binary string representation array.
Declaration
public static string[] BytesToStrings(byte[] input)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | input | The byte array to convert. |
Returns
| Type | Description |
|---|---|
| System.String[] |
ByteToString(Byte)
Converts a byte to a binary string representation.
Declaration
public static string ByteToString(byte input)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | input | The byte to convert. |
Returns
| Type | Description |
|---|---|
| System.String |
GetCharacterByName(String)
Gets the Character enum value by name.
Declaration
[Obsolete("Utils.StringUtils.GetCharacterByName() is deprecated, please use CharacterApi.GetCharacterByName() instead.")]
public static Character GetCharacterByName(string characterName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | characterName | Character name. |
Returns
| Type | Description |
|---|---|
| Character | The Character enum value. |
GetCharacterSafeName(Character)
Returns a machine safe name for the specified character.
Declaration
public static string GetCharacterSafeName(Character character)
Parameters
| Type | Name | Description |
|---|---|---|
| Character | character | The character. |
Returns
| Type | Description |
|---|---|
| System.String | The machine safe name. |
GetStageReadableName(Stage)
Returns a readable name for the specified stage.
Declaration
public static string GetStageReadableName(Stage stage)
Parameters
| Type | Name | Description |
|---|---|---|
| LLHandlers.Stage | stage | The stage. |
Returns
| Type | Description |
|---|---|
| System.String | The stage's human readable name. |
PrettyPrintBytes(Byte[])
Converts a bytes to a binary string representation.
Declaration
public static string PrettyPrintBytes(byte[] input)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | input | The byte array to convert. |
Returns
| Type | Description |
|---|---|
| System.String |
TheWitcherGetCharacterByName(String)
Gets the Character enum value by name.
Declaration
[Obsolete("Utils.StringUtils.TheWitcherGetCharacterByName() is deprecated, please use CharacterApi.TheWitcherGetCharacterByName() instead.")]
public static Character TheWitcherGetCharacterByName(string characterName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | characterName | Character name. |
Returns
| Type | Description |
|---|---|
| Character | The Character enum value. |
Remarks
This version uses GetEnumValues<T>() instead of looping