srfi-238-string/README.md

23 lines
704 B
Markdown

# SRFI 238 - portable string-based implementation
This is an implementation SRFI 238 based around the following C
interface.
```
char *codeset_list(void);
char *codeset_numbers(const char *codeset);
char *codeset_symbols(const char *codeset);
char *codeset_messages(const char *codeset);
```
Each function returns a newline-delimited C string.
The idea is to make the interface so simple that it can be wrapped
easily using the FFI of any Scheme implementation that has one.
(Non-Scheme languages like Common Lisp or ML could make use of the
same C code.)
The downside is that memory usage is not optimal. All strings are
retrieved from C at once, and half of the string handling is done in
Scheme.