Namespace Perlang.Lang
Classes
AsciiString
Representation of a string with ASCII-only content.
AsciiString have the following characteristics:
They consist of valid ASCII characters (0-127) only.
They are immutable. Once constructed, an AsciiString cannot be modified. Methods which seem to perform "modifications" of the string like to_upper() etc. will always allocate a new instance and operate on that.
They are backed by native memory. This means that they can be used with zero/very low cost together with standard POSIX/libc functions like
puts
,memcmp
, etc.
String
Base class for Perlang strings
Concrete implementations of this string are currently the following:
- AsciiString - a string known to consist of valid ASCII characters only. The uppermost bit in each byte is zero for all characters.
- Utf8String - a string which can contain all Unicode characters, encoded with the UTF-8 encoding.
Utf8String
Representation of a string encoded with the UTF-8 encoding.
UTF-8 strings can represent the full Unicode span of characters. Their main disadvantage is that the variable-length encoding of non-ASCII characters makes looping over characters be a much more complex process than with AsciiString or the future Utf16String.