Changeset 85842 in vbox for trunk/tools/win
- Timestamp:
- Aug 19, 2020 9:25:14 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/win/vbscript/helpers.vbs
r85840 r85842 869 869 870 870 871 '' 872 ' Checks if the string ends with the given suffix (case sensitive). 873 function StrEndsWith(str, strSuffix) 874 if len(str) >= Len(strSuffix) then 875 StrEndsWith = (StrComp(Right(str, Len(strSuffix)), strSuffix, vbBinaryCompare) = 0) 876 else 877 StrEndsWith = false 878 end if 879 end function 880 881 882 '' 883 ' Checks if the string ends with the given suffix, case insenstive edition. 884 function StrEndsWithI(str, strSuffix) 885 if len(str) >= Len(strSuffix) then 886 StrEndsWithI = (StrComp(Right(str, Len(strSuffix)), strSuffix, vbTextCompare) = 0) 887 else 888 StrEndsWithI = false 889 end if 890 end function 891 892 871 893 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 872 894 ' Helpers: Arrays ' … … 1547 1569 end sub 1548 1570 1571 ' 1572 ' Run the self tests if we're executed directly. 1573 ' 1574 if StrEndsWithI(Wscript.ScriptFullName, "\tools\win\vbscript\helpers.vbs") then 1575 Wscript.echo "helpers.vbs: Running self test..." 1576 SelfTest 1577 Wscript.echo "helpers.vbs: Self test complete." 1578 end if
Note:
See TracChangeset
for help on using the changeset viewer.