Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,28 +0,0 @@
|
|||
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 "))
|
||||
Loading…
Add table
Add a link
Reference in a new issue