Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/String-comparison/Racket/string-comparison.rkt
Normal file
16
Task/String-comparison/Racket/string-comparison.rkt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#lang racket
|
||||
|
||||
;; Comparing two strings for exact equality
|
||||
(string=? "foo" "foo")
|
||||
|
||||
;; Comparing two strings for inequality
|
||||
(not (string=? "foo" "bar"))
|
||||
|
||||
;; Comparing two strings to see if one is lexically ordered before than the other
|
||||
(string<? "abc" "def")
|
||||
|
||||
;; Comparing two strings to see if one is lexically ordered after than the other
|
||||
(string>? "def" "abc")
|
||||
|
||||
;; How to achieve both case sensitive comparisons and case insensitive comparisons within the language
|
||||
(string-ci=? "foo" "FOO")
|
||||
Loading…
Add table
Add a link
Reference in a new issue