Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
18
Task/String-comparison/Ring/string-comparison.ring
Normal file
18
Task/String-comparison/Ring/string-comparison.ring
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
if s1 = s2
|
||||
See "The strings are equal"
|
||||
ok
|
||||
if not (s1 = s2)
|
||||
See "The strings are not equal"
|
||||
ok
|
||||
if strcmp(s1,s2) > 0
|
||||
see "s2 is lexically ordered before than s1"
|
||||
ok
|
||||
if strcmp(s1,s2) < 0
|
||||
see "s2 is lexically ordered after than s1"
|
||||
ok
|
||||
|
||||
To achieve case insensitive comparisons, we should use Upper() or Lower() functions:
|
||||
|
||||
if Upper(s1) = Upper(s2)
|
||||
see "The strings are equal"
|
||||
ok
|
||||
Loading…
Add table
Add a link
Reference in a new issue