Fixed-width strings: Difference between revisions

Jump to navigation Jump to search
m
Line 24: Line 24:
The maximum string width determines the way strings are created. It is an optional argument to the string constructors.
The maximum string width determines the way strings are created. It is an optional argument to the string constructors.
# 8 bits: If the source data contains 16 or 32 bit data, the return value is null.
# 8 bits: If the source data contains 16 or 32 bit data, the return value is null.
#16 bits: If the source data contains 32 bit values, surrogate pairs are created. If a source data value of > 0x10FFFF, null is returned.
#16 bits: If the source data contains 32 bit values, surrogate pairs are created. If a character is > 0x10FFFF, null is returned.
 
''Question: How are out-of-memory conditions handled? The current implementation often just assumes success. There should be some sort of exception, and the same mechanism should be used to report strings that cannot be created.''


=== Concatenation, substrings, and flattening ===
=== Concatenation, substrings, and flattening ===
55

edits

Navigation menu