This readme contains:
* DataTypes
* Function Index
* Frunction Details
Function name/arity | Description
--- | ---
bocu/1 |
charToInt/1 |
convertEncoding/2 | Converts an mb string from Encoding to NewEncoding
format/1 | Formats the mbstring for output
fwrite/2 | Outputs an mbstring to a file
getNextCharAsInt/1 |
hasProcess/1 |
hasTable/1 |
hexString_to_List/1 |
init/0 | Reads the unicode- and encodings-related tables and builds them if absent
isASCII/1 |
len/1 |
lenB/1 |
new/0 | Creates a new empty mb string, a tuple {encoding_atom, <<"">>}
new/1 | Creates a new mb string, a tuple {encoding_atom, <<Binary_String>>}
new/2 | Creates a new mb string, a tuple {encoding_atom, <<Binary_String>>}
new/3 | Creates a new mb string, a tuple {encoding_atom, <<Binary_String>>}
print/1 |
print/2 | Formats an mbstring and outputs it
reset/0 | Rebuilds the unicode- and encodings-related tables
bocu(X1) -> any()
charToInt(Char) -> any()
convertEncoding(OriginalString::mbString(), NewEncoding::atom()) -> mbString()
Converts an mb string from Encoding to NewEncoding.
Example:
1> HONG2=mb:convertEncoding({utf8, "\345\274\230"}, utf16).
{utf16,<<95,24>>}
format(MBString::mbString()) -> list()
Formats the mbstring for output.
Example:
1> HAN=mb:new("\345\257\222"). ==> That's [U+5BD2]/Cold.
{utf8,<<229,175,146>>}
2> io:format("~s~n",[mb:format(HAN)]).
\345\257\222
Just a hack really.
fwrite(MBString::mbString(), FileName::list()) -> atom()
Outputs an mbstring to a file.
Example
1> HAN=mb:new("\345\257\222"). ==> That's [U+5BD2]/Cold.
{utf8,<<229,175,146>>}
2> mb:fwrite(HAN, MyFile).
ok
getNextCharAsInt(X1) -> any()
hasProcess(X) -> any()
hasTable(X) -> any()
hexString_to_List(Code) -> any()
init() -> atom()
Reads the unicode- and encodings-related tables and builds them if absent
See also: reset/0.
isASCII(Tring) -> any()
len(MyString) -> any()
lenB(X1) -> any()
new() -> mbString()
Creates a new empty mb string, a tuple {encoding_atom, <<"">>}.
Example:
1> HAN=mb:new("").
{utf8,<<>>}
See also: new/1, new/2, new/3.
new(String::list()) -> mbString()
Creates a new mb string, a tuple {encoding_atom, <<Binary_String>>}. You can specify the encoding, and even request an on-the-fly conversion.
Example:
1> HAN=mb:new("\345\257\222"). ==> That's [U+5BD2]/Cold.
{utf8,<<229,175,146>>}
See also: new/0, new/2, new/3.
new(String::list(), OriginalEncoding::atom()) -> mbString()
Creates a new mb string, a tuple {encoding_atom, <<Binary_String>>}. You can specify the encoding, and even request an on-the-fly conversion.
Example:
2> HONG=mb:new(<<"\345\274\230">>). ==> That's [U+5F18]/Strong
{utf8,<<229,188,152>>}
See also: new/0, new/1, new/3.
new(String::list(), OriginalEncoding::atom(), RequestedEncoding::atom()) -> mbString()
Creates a new mb string, a tuple {encoding_atom, <<Binary_String>>}. You can specify the encoding, and even request an on-the-fly conversion.
Example:
3> HONG2=mb:new("\345\274\230", utf8, utf16).
{utf16,<<95,24>>}
See also: new/0, new/1, new/2.
print(MBString::mbString()) -> atom()
See also: format/1, fwrite/2, print/2.
print(MBString::mbString(), Params::list()) -> atom()
Formats an mbstring and outputs it.
Example:
1> HAN=mb:new("\345\257\222"). ==> That's [U+5BD2]/Cold.
{utf8,<<229,175,146>>}
2> mb:print(HAN, ["\n"]).
\345\257\222
ok
See also: format/1, fwrite/2, print/1.
reset() -> atom()
Rebuilds the unicode- and encodings-related tables. What it really does is delete the dets tables.
See also: init/0.