Returns
#t
if object is a string; otherwise returns#f
.(string? "Hi") ⇒ #t (string? 'Hi) ⇒ #f
Returns the length of string as an exact non-negative integer.
(string-length "") ⇒ 0 (string-length "The length") ⇒ 10
Returns
#t
if string has zero length; otherwise returns#f
.(string-null? "") ⇒ #t (string-null? "Hi") ⇒ #f
Returns character k of string. K must be a valid index of string.
(string-ref "Hello" 1) ⇒ #\e (string-ref "Hello" 5) error--> 5 not in correct range
Stores char in element k of string and returns an unspecified value. K must be a valid index of string, and char must satisfy the predicate
char-ascii?
.(define str "Dog") ⇒ unspecified (string-set! str 0 #\L) ⇒ unspecified str ⇒ "Log" (string-set! str 3 #\t) error--> 3 not in correct range