FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Code change since the initial 10.0 release.
9.0 version

string-to-native

Arguments: string &key (start 0) (end (length string)) address (external-format :default) aligned (null-terminate t) result-vector

This function was modified by a patch which added the two additional keyword arguments null-terminate and result-vector. Behavior of this function if those arguments are unspecified has not changed. The documentation assumes the patch has been applied. (The patch is for version 10.0 only. Earlier versions are not changed.)

There are two return values. The second return value is always the number of bytes copied. The first return value depends on the value of the result-vector argument:

This function converts (according to the external-format argument) and copies the string data from indices specified by start to end out of the Lisp string into a location determined by other arguments. Here is where the data is copied to:

If the aligned keyword argument is true, then address is an aligned address. Aligned addresses are returned by functions like lispval-to-aligned-malloc-address.

The copied string data will be null-terminated if the null-terminate keyword argument is true (the default). Null terminated means that the byte following the last data element is 0. The number of 8-bit bytes copied including the null-terminator if present is returned as the second value of this function.

Conversion is done using the specified external-format. If external-format is not specified (or, equivalently, if the value of external-format is :default), then the external format returned by the following form is used:

(locale-external-format *locale*)

See locale-external-format and *locale*. See also string-to-octets, native-to-string, octets-to-native, and with-native-string.

See also iacl.htm for general information on international character set support in Allegro CL. See foreign-functions.htm for information on foreign functions.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Code change since the initial 10.0 release.
9.0 version