[Logiqx, Utilities] Use helper methods

This commit is contained in:
Matt Nadareski
2018-01-04 18:14:47 -08:00
parent 616ede6f58
commit e04370b1f1
2 changed files with 34 additions and 175 deletions

View File

@@ -813,6 +813,23 @@ namespace SabreTools.Library.Tools
}
}
/// <summary>
/// Get bool value from input string
/// </summary>
/// <param name="yesno">String to get value from</param>
/// <returns>Bool corresponding to the string</returns>
public static bool GetYesNo(string yesno)
{
switch (yesno?.ToLowerInvariant())
{
case "yes":
return true;
default:
case "no":
return false;
}
}
#endregion
#region File Information