Functions Index :: S :: StrCompare

[<< up one level]


string :: core


StrCompare(string s1, string s2, bool "ignorecase", string "comparefunc")


Compares strings s1 and s2 and returns -1,0,1 if s1 < s2, s1 == s2, s1 > s2, respectively.


ignorecase (Optional, defaults to True): Set it to false to perform a case-sensitive comparison.

comparefunc (Optional, defaults to standard Avisynth string comparison): A user-defined function that accepts up to three arguments (the same as StrCompare, ie s1, s2 and (optionally) ignorecase and returns the same values as StrCompare. Use it whenever a non-standard comparison has to be performed.

Notes and conditions on arguments relations:


v1 = StrCompare("aviSynth", "Avisynth") # v1 == 0

v2 = StrCompare("aviSynth", "Avisynth", true) # v2 == 1


[<< top]