Next: , Up: built-in strings   [Contents][Index]


6.14.1 Base string type

Core Type: <string>
Parent Type: <top>

Type of string values.

Constructor on <string>: <string> type-constructor {ch <char>} …

The constructor is string.

Type predicate on <string>: <boolean> type-predicate obj

The type predicate is string?. Return #t if obj is a string object; otherwise return #f.

Equality predicate on <string>: <boolean> equality-predicate this {str <string>}

The equality predicate is string=?.

Comparison procedure on <string>: <fixnum> comparison-procedure this {str <string>}

The comparison procedure is compar-string.

Hash function on <string>: <non-negative-fixnum> hash-function this

The hash function is string-hash.

Inspection

Method on <string>: <boolean> empty? this

Apply string-empty? to the instance.

Method on <string>: <non-negative-fixnum> length this

Apply string-length to the instance.

Method on <string>: () for-each this func str

Apply string-for-each to the function func, the instance and the arguments. Example:

(.for-each "ciao" display)

Constructors

Method on <string>: <string> copy this

Apply string-copy to the instance and return its return value.

Method on <string>: <string> append this {str <string>} …

Apply string-append to the arguments and return its return value.

Accessors and mutators

Method on <string>: <string> fill! this char

Apply string-fill! to the instance.

Encoding inspection

Method on <string>: <boolean> ascii-encoded? this

Apply ascii-encoded-string? to the instance.

Method on <string>: <boolean> latin1-encoded? this

Apply latin1-encoded-string? to the instance.

Method on <string>: <boolean> octets-encoded? this

Apply octets-encoded-string? to the instance.

Method on <string>: <boolean> uri-encoded? this

Apply uri-encoded-string? to the instance.

Method on <string>: <boolean> pencent-encoded? this

Apply percent-encoded-string? to the instance.

Comparison

Method on <string>: <boolean> = this str
Method on <string>: <boolean> != this str
Method on <string>: <boolean> < this str
Method on <string>: <boolean> > this str
Method on <string>: <boolean> <= this str
Method on <string>: <boolean> >= this str

Apply string=?, string!=?, string<?, string>?, string<=?, string>=? to the instance and the arguments and return its return value.

Method on <string>: <boolean> ci= this str
Method on <string>: <boolean> ci< this str
Method on <string>: <boolean> ci> this str
Method on <string>: <boolean> ci<= this str
Method on <string>: <boolean> ci>= this str

Apply string-ci=?, string-ci<?, string-ci>?, string-ci<=?, string-ci>=?, to the instance and the arguments and return its return value.

Case handling

Method on <string>: <string> titlecase this

Apply string-titlecase to the instance.

Method on <string>: <string> upcase this

Apply string-upcase to the instance.

Method on <string>: <string> downcase this

Apply string-downcase to the instance.

Method on <string>: <string> foldcase this

Apply string-foldcase to the instance.

Normalisation

Method on <string>: <string> normalize-nfc this

Apply string-normalize-nfc to the instance.

Method on <string>: <string> normalize-nfd this

Apply string-normalize-nfd to the instance.

Method on <string>: <string> normalize-nfkc this

Apply string-normalize-nfkc to the instance.

Method on <string>: <string> normalize-nfkd this

Apply string-normalize-nfkd to the instance.

Conversion

Method on <string>: <flonum> flonum this

Apply string->flonum to the instance.

Method on <string>: <number> number this
Method on <string>: <number> number this radix

Apply string->number to the instance and the argument.

Method on <string>: <bytevector> utf8 this

Apply string->utf8 to the instance.

Method on <string>: <bytevector> utf16 this
Method on <string>: <bytevector> utf16 this endianness

Apply string->utf16 to the instance and the argument.

Method on <string>: <bytevector> utf16be this

Apply string->utf16be to the instance.

Method on <string>: <bytevector> utf16le this

Apply string->utf16le to the instance.

Method on <string>: <bytevector> utf16n this

Apply string->utf16n to the instance.

Method on <string>: <bytevector> utf32 this
Method on <string>: <bytevector> utf32 this endianness

Apply string->utf32 to the instance and the argument.

Method on <string>: <bytevector> bytevector this
Method on <string>: <bytevector> bytevector this transcoder

Apply string->bytevector to the instance and the argument.

Method on <string>: <bytevector> ascii this

Apply string->ascii to the instance.

Method on <string>: <bytevector> latin1 this

Apply string->latin1 to the instance.

Method on <string>: <bytevector> octets this

Apply string->octets to the instance.

Method on <string>: <bytevector> percent-encoding this

Apply string->percent-encoding to the instance.

Method on <string>: <bytevector> uri-encoding this

Apply string->uri-encoding to the instance.

Method on <string>: <bytevector> base64->bytevector this

Apply string-base64->bytevector to the instance.

Method on <string>: <bytevector> hex->bytevector this

Apply string-hex->bytevector to the instance.

Method on <string>: <symbol> symbol this

Apply string->symbol to the instance.

Method on <string>: <keyword> keyword this

Apply string->keyword to the instance.

Method on <string>: (list-of <char>) list this

Apply string->list to the instance.


Next: , Up: built-in strings   [Contents][Index]