Skip to content
DucNV_2000 edited this page Mar 1, 2024 · 33 revisions

Common

  • IsInteger checks the input value is an integer or not
static bool IsInteger(float value)
  • GetNumberInAString Gets the first number that appears in the input string
static int GetNumberInAString(string str)
// exp: str = ab234dc => result: 234
// exp: str = ab23df45 => result: 23
  • CallActionAndClean execute the call action and remove the original reference
static void CallActionAndClean(ref Action action)
  • IsNullOrEmpty check null or empty
static bool IsNullOrEmpty<T>(this List<T> source) // check list
static bool IsNullOrEmpty<T>(this T[] source) // check array
static bool IsNullOrEmpty<TKey, TValue>(this Dictionary<TKey, TValue> source) // check dictionary
  • Shuffle
static void Shuffle<T>(this T[] source) // shuffle the elements in the array
static void Shuffle<T>(this List<T> source) // shuffle the elements in the list
static IDictionary<T1, T2> Shuffle<T1, T2>(this IDictionary<T1, T2> source) // shuffle the elements in the dictionary
Clone this wiki locally