Function | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 This page is new in 10.1.

## unicode-code-at

Arguments: string index

The Allegro CL character string implementation stores Unicode characters using the UTF-16 encoding. Unicode characters with codes above the 16-bit range are stored as two string characters, a high surrogate character followed by a low surrogate character. All the ACL string manipilation functions interpret a character string as a uniform array of 16-bit characters.

This function allows a program to walk a string extracting the actual Unicode characters stored in it. string is the string to be examined. index is the index or the character to examine.

The function returns two values

1. An integer Unicode character code or `nil`
2. One of the values 1, 2, `:high-surrogate`, or `:low-surrogate`.

If the first value is an integer, the second value specifies how many string characters were used to compose the first value.

If the first value is `nil`, the string character at index is not a valid Unicode code point. In that case the second value describes the string character at index with these return values:

- `:high-surrogate`: The string character at index is a high surrogate character that is not immediately followed by a low surrogate character in the string.
- `:low-surrogate`: The string character at index is a low surrogate character. There is no check for a preceding high surrogate character.

See iacl.htm for more information on international characters and external formats.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page is new in the 10.1 release.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 This page is new in 10.1.