4.8 Text
On this page:
text?
text-length
text-ref
subtext
text-append
4.8.1 Comparison
text=?
text<?
text>?
text≤?
text≥?
4.8.1.1 Case-Insensitive Comparison
text-ci=?
text-ci<?
text-ci>?
text-ci≤?
text-ci≥?
4.8.1.2 Case Mapping
text-uppercase
text-lowercase
text-titlecase
text-foldcase
4.8.1.3 Normalization
text-normalize-nfd
text-normalize-nfc
text-normalize-nfkd
text-normalize-nfkc
8.12

4.8 Text🔗ℹ

Elle’s text data type is an immutable string of Unicode characters (code points).

procedure

(text? v)  boolean?

  v : any/c
Returns #true, if v is a text value, #false, otherwise.

procedure

(text-length txt)  natural?

  txt : text?
Returns the number of characters in the txt.

procedure

(text-ref txt n)  char?

  txt : text?
  n : natural?
Returns the character located at position n in txt, with indices begining at zero.

procedure

(subtext txt start [end])  text?

  txt : text?
  start : natural?
  end : natural? = (text-length txt)
Returns the portion of txt, begining at the index start, inclusive, and ending at the index, end, exclusive.

procedure

(text-append txt ...)  text?

  txt : text?
Returns a new text value that contains the concatenated character content of the txts, in order. In the special case of zero txts, returns the empty text value.

4.8.1 Comparison🔗ℹ

procedure

(text=? txt ...+)  boolean?

  txt : text?
Returns #true, if all the txts have identical character content; #false, otherwise.

procedure

(text<? txt ...+)  boolean?

  txt : text?
Returns #true, if the txts are in increasing lexicographical order, given locale-insensitive, case-sensitive comparison; #false, otherwise.

procedure

(text>? txt ...+)  boolean?

  txt : text?
Returns #true, if the txts are in decreasing lexicographical order, given locale-insensitive, case-sensitive comparison; #false, otherwise.

procedure

(text≤? txt ...+)  boolean?

  txt : text?
Returns #true, if the txts are in nondecreasing lexicographical order, given locale-insensitive, case-sensitive comparison; #false, otherwise.

procedure

(text≥? txt ...+)  boolean?

  txt : text?
Returns #true, if the txts are in nonincreasing lexicographical order, given locale-insensitive, case-sensitive comparison; #false, otherwise.

4.8.1.1 Case-Insensitive Comparison🔗ℹ

procedure

(text-ci=? txt ...+)  boolean?

  txt : text?
Like text=?, but case-insensitive.

procedure

(text-ci<? txt ...+)  boolean?

  txt : text?
Like text<?, but case-insensitive.

procedure

(text-ci>? txt ...+)  boolean?

  txt : text?
Like text>?, but case-insenstive.

procedure

(text-ci≤? txt ...+)  boolean?

  txt : text?
Like text≤?, but case-insensitive.

procedure

(text-ci≥? txt ...+)  boolean?

  txt : text?
Like text≥?, but case-insensitive.

4.8.1.2 Case Mapping🔗ℹ

procedure

(text-uppercase txt)  text?

  txt : text?
Returns text whose character content has been mapped to uppercase characters, given Unicode’s local-independent uppercase mapping rules.

procedure

(text-lowercase txt)  text?

  txt : text?
Like text-uppercase, but for lowercase mapping.

procedure

(text-titlecase txt)  text?

  txt : text?
Like text-uppercase, but for titlecase mapping.

procedure

(text-foldcase txt)  text?

  txt : text?
Like text-uppercase, but for case-folding.

4.8.1.3 Normalization🔗ℹ

procedure

(text-normalize-nfd txt)  text?

  txt : text?
Returns text that is normalized according to Unicode Normalized Form D.

procedure

(text-normalize-nfc txt)  text?

  txt : text?
Like text-normalize-nfd, but for Normalized Form C.

procedure

(text-normalize-nfkd txt)  text?

  txt : text?
Like text-normalize-nfd, but for Normalized Form KD.

procedure

(text-normalize-nfkc txt)  text?

  txt : text?
Like text-normalize-nfd, but for Normalized Form KC.