wstring

wstring(s)

This is a synonym for either utf32(s) or utf16(s), depending on whether Cwchar_t is 32 or 16 bits, respectively. The synonym WString for UTF32String or UTF16String is also provided.

Examples

Sure! Here's the documentation for the wstring function:

The wstring function in Julia is a synonym for either utf32(s) or utf16(s), depending on whether Cwchar_t is 32 or 16 bits, respectively. It is used to convert a given string s into a wide string representation. The function returns a wide string representation of the input string.

julia> wstring("Hello")
"Hello"

In this example, the wstring function is used to convert the string "Hello" into a wide string representation. Since Cwchar_t is typically 32 bits on most systems, utf32 is used internally to convert the string.

julia> wstring("こんにちは")
"こんにち"

In this example, the wstring function is used to convert a Japanese string "こんにちは" into a wide string representation. Again, since Cwchar_t is typically 32 bits, utf32 is used to generate the wide string.

The wstring function also provides a synonym WString, which can be used interchangeably with UTF32String or UTF16String:

julia> WString("Hello")
"Hello"
julia> WString("こんにちは")
"こんにち"

Please note that the behavior of wstring depends on the system's Cwchar_t configuration. The function will automatically choose the appropriate wide string representation based on the system's configuration.

See Also

ascii, base64decode, Base64DecodePipe, base64encode, Base64EncodePipe, bin, bits, bytestring, charwidth, chomp, chop, chr2ind, contains, endswith, escape_string, graphemes, ind2chr, iscntrl, istext, isupper, isvalid, join, lcfirst, lowercase, lpad, lstrip, normalize_string, num2hex, parseip, randstring, readuntil, replace, repr, rpad, rsplit, rstrip, search, searchindex, split, startswith, string, stringmime, strip, strwidth, summary, takebuf_string, ucfirst, unescape_string, uppercase, utf16, utf32, utf8, wstring,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: