utf8.force

From Garry's Mod
Jump to: navigation, search
 utf8.force( )

Description

Forces a string to contain only valid UTF-8 data. Invalid sequences are replaced with U+FFFD (the Unicode replacement character).

This is a lazy way for users to ensure a string contains only valid UTF-8 data.

Arguments

string string

The string that will become a valid UTF-8 string.

Returns

string

The UTF-8 string.
Personal tools
Navigation