Language: Add comments
This commit is contained in:
@@ -42,6 +42,11 @@ Public Class Utils
|
||||
Return [Enum].ToObject(GetType(T), value)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Converts a string to boolean. Accepts true and 1 as truthy values
|
||||
''' </summary>
|
||||
''' <param name="input">The input string</param>
|
||||
''' <returns>True if input is true or 1, otherwise false.</returns>
|
||||
Public Shared Function ToBoolean(input As String) As Boolean
|
||||
If String.IsNullOrEmpty(input) Then Return False
|
||||
Return (input.Trim().ToLower() = "true") OrElse (input.Trim() = "1")
|
||||
@@ -151,6 +156,11 @@ Public Class Utils
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks if string contains invalid characters
|
||||
''' </summary>
|
||||
''' <param name="pString"></param>
|
||||
''' <returns></returns>
|
||||
Public Shared Function TestContainsInvalidCharacters(pString As String) As Boolean
|
||||
Return Not pString.Equals(RemoveInvalidCharacters(pString))
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user