Table of Contents

Class Extensions

Namespace
Obsidian.API.Utilities
Assembly
Obsidian.API.dll
public static class Extensions
Inheritance
Extensions
Inherited Members

Methods

Capitalize(string?)

public static string Capitalize(this string? value)

Parameters

value string

Returns

string

EqualsIgnoreCase(string, string)

public static bool EqualsIgnoreCase(this string a, string b)

Parameters

a string
b string

Returns

bool

GetDescription(Enum)

public static string GetDescription(this Enum value)

Parameters

value Enum

Returns

string

Remarks

This method is not and shouldn't be used in performance-critical sections. Source: https://stackoverflow.com/a/1415187

GetIndexFromArray(string[], string)

public static int GetIndexFromArray(this string[] array, string value)

Parameters

array string[]
value string

Returns

int

GetIndexFromJaggedArray(int[][], int[])

public static int GetIndexFromJaggedArray(this int[][] array, int[] value)

Parameters

array int[][]
value int[]

Returns

int

GetStateValues(int[], Dictionary<string, string[]>)

public static List<string> GetStateValues(this int[] indexes, Dictionary<string, string[]> valueStores)

Parameters

indexes int[]
valueStores Dictionary<string, string[]>

Returns

List<string>

IsNullOrEmpty(string?)

public static bool IsNullOrEmpty(this string? value)

Parameters

value string

Returns

bool

IsNullOrWhitespace(string?)

public static bool IsNullOrWhitespace(this string? value)

Parameters

value string

Returns

bool

ToEnchantType(string)

public static EnchantmentType ToEnchantType(this string source)

Parameters

source string

Returns

EnchantmentType

ToPascalCase(string)

public static string ToPascalCase(this string snakeCase)

Parameters

snakeCase string

Returns

string

ToSnakeCase(string)

public static string ToSnakeCase(this string str)

Parameters

str string

Returns

string

TrimResourceTag(string, bool)

Trims resource tag from the start and removes '_' characters.

public static string TrimResourceTag(this string value, bool keepUnderscores = false)

Parameters

value string
keepUnderscores bool

Returns

string