String comparison: Difference between revisions

Added EasyLang implementation
m (→‎{{header|J}}: add usage note)
(Added EasyLang implementation)
Line 1,890:
'cat' is lexically before 'dog'.
'cat' is not lexically after 'dog'.
</pre>
 
=={{header|EasyLang}}==
EasyLang only has operators for testing the equality and inequality of strings.
<syntaxhighlight lang="easylang">
stringA$ = "String"
stringB$ = "string"
stringC$ = "string"
if stringB$ = stringC$
print "\"" & stringB$ & "\" is equal to \"" & stringC$ & "\""
.
if stringA$ <> stringB$
print "\"" & stringA$ & "\" is not equal to \"" & stringB$ & "\""
.
</syntaxhighlight>
{{out}}
<pre>
"string" is equal to "string"
"String" is not equal to "string"
</pre>
 
175

edits