Given:
2 strings strA, strB
I want:
To perform a comparison between them and return <0, =0 or >0, in Intersystems Cache ObjectScript.
So far:
I have found a function in the documentation that fulfills my needs StrComp. Unfortunately, this function is not part of Cache ObjectScript, but from Caché Basic.
I have wrapped the function as a classMethod of an utility class:
ClassMethod StrComp(
pstrElem1 As %String,
pstrElem2 As %String) As %Integer [ Language = basic ]
{
Return StrComp(pstrElem1,pstrElem2)
}
Is this approach recommended? is there any function available?
Thanks in advance.