Equals, Begins, Ends etc.



[1]
(value = strX) string equality check
  Returns True / false
  value Any Director value
     
  Description Checks if the string representation of value is equal to strX. The comparison is case insensitive.
Note that unlike value=strX, strX=value check is performed by Director, not by the Xtra.
     
  Examples put _s("a")="a"
--1

put [#a]=_s("[#a]")  -- check performed by the Xtra
-- 1
put _s("[#a]")=[#a]  -- check performed by Director.
-- 0
     
  Notes This check is equal to ( strX.iCmp(value)=0 )

[2]
strX.is( str ) object equality check
  Returns True / false
  str Any Director value
     
  Description Checks if str is actually the object strX
     
  Examples s=_s("abc")
r=s.ref
put s=r
-- 1
put s.is(r)
-- 0
     
  Notes  

[3]
strX.sCmp( str ) / strX.iCmp( str ) string comparison
  Returns -1, 0, 1
  str Any Director value
     
  Description Compares the string representation of strX and str.
sCmp performs a case sensitive comparison. iCmp a case insensitive comparison.
-1: strX is lower (alphabetically) than value
0: no differences
1: strX is higher (alphabetically) than value
     
  Examples put _s("a").iCmp("A")
-- 0
put _s("a").sCmp("A")
-- 1
put _s("b").sCmp("c")
-- -1
put _s("b").sCmp("a")
-- 1
put _s("ab").sCmp("a")
-- 1
     
  Notes Case sensitive comparisons are significantly faster than case insensitive ones. (reminder tip: s for speed).

[4]
strX.sBgns( str ) / strX.iBgns( str ) begins check
  Returns True / False
  str Any Director value
     
  Description Check if strX begins with str.
sBgns: case sensitive.
iBgns: case insensitive.
     
  Examples put _s("ab").sBgns("a")
-- 1
put _s("ab").sBgns("A")
-- 0

put _s("abcd").sBgns( _d("ab") )  --type conversions will be performed as required.
-- 1
     
  Notes  

[5]
strX.sEnds( str ) / strX.iEnds( str ) ends check
  Returns True / False
  str Any Director value
     
  Description Check if strX ends with str.
sEnds: case sensitive.
iEnds: case insensitive.
     
  Examples put _s("abc").sEnds("c")
-- 1
put _s("abc").sEnds("Bc")
-- 0
put _s("abc").iEnds("Bc")
-- 1
     
  Notes  

[6]
strX.sIncs( str ) / strX.iIncs( str ) includes check
  Returns True / False
  str Any Director value
     
  Description Check if strX includes str.
sIncs: case sensitive.
iIncs: case insensitive.
     
  Examples put _s("abc").sIncs("c")
-- 1
put _s("abc").sIncs("Bc")
-- 0
     
  Notes  

[7]
strX.sAprs( str ) / strX.iAprs( str ) appearances count
  Returns Integer
  str Any Director value
     
  Description Returns the total appearances of str in strX
sAprs: case sensitive.
iAprs: case insensitive.
     
  Examples put _s("abcd-ABCD").sAprs("ab")
-- 1
put _s("abcd-ABCD").iAprs("ab")
-- 2
     
  Notes