Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,28 @@
Function LeftTrim(s)
Set regex = New RegExp
With regex
.Pattern = "^\s*"
If .Test(s) Then
LeftTrim = .Replace(s,"")
Else
LeftTrim = s
End If
End With
End Function
Function RightTrim(s)
Set regex = New RegExp
With regex
.Pattern = "\s*$"
If .Test(s) Then
RightTrim = .Replace(s,"")
Else
RightTrim = s
End If
End With
End Function
'testing the functions
WScript.StdOut.WriteLine LeftTrim(" RosettaCode")
WScript.StdOut.WriteLine RightTrim("RosettaCode ")
WScript.StdOut.WriteLine LeftTrim(RightTrim(" RosettaCode "))