method
iconv
v1_8_7_72 -
Show latest stable
- Class:
Iconv
iconv(...)public
Document-method: Iconv#iconv
Converts string and returns the result.
- If str is a String, converts str[start, length] and returns the converted string.
- If str is nil, places converter itself into initial shift state and just returns a string containing the byte sequence to change the output buffer to its initial shift state.
- Otherwise, raises an exception.
Parameters
| str: | string to be converted, or nil |
| start: | starting offset |
| length: | conversion length; nil or -1 means whole the string from start |
Exceptions
- IconvIllegalSequence
- IconvInvalidCharacter
- IconvOutOfRange
Examples
See the Iconv documentation.