StringArrUtils.cs 350 B

1234567891011121314151617
  1. namespace ET;
  2. public static class StringArrUtils
  3. {
  4. public static string GetValueFromArr(this string[] arr, string name)
  5. {
  6. foreach (string str in arr)
  7. {
  8. if (str.StartsWith("--" + name + "="))
  9. {
  10. return str.Substring(name.Length + 3);
  11. }
  12. }
  13. return null;
  14. }
  15. }