mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Logiqx, Utilities] Use helper methods
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user