[Overview][Types][Classes][Procedures and functions][Variables][Index] |
Gets the specified command line parameter and converts it to a UTF-8-encoded string.
Source position: lazutf8.pas line 63
function ParamStrUTF8( |
Param: Integer |
):string; |
Param |
|
Ordinal position for the command line parameter retrieved in the routine. |
UTF-8-encoded value for the specified command line parameter.
ParamStrUTF8 is a String function used to convert the specified command line parameter to a UTF-8-encoded string. The implementation for ParamStrUTF8 is OS- or platform-specific. For UNIX-like environments, SysToUTF8 is called to convert the value for the command line parameter at the position in Param. For Windows platforms, the stub for the Ansi or WideString version of ParamStrUTF8 is called. ParamStrUTF8 is the UTF-8-enabled counterpart to the ParamStr routine in RTL.
Index is the ordinal position for the requested parameter value. Index should be in the range 0..ParamCount. Values in Index outside this range cause an empty string ('') to be returned for a parameter value.
In most cases, the parameter at position 0 contains the name and optional path to the executable file for the application. For cross-platform compatibility, use the ExeName property in TCustomApplication to get the path and name for the binary instead. Subsequent index positions contain any command line arguments passed to the executable.
The return value contains the UTF-8-encoded string with the value for the parameter at the specified position, or an empty string when not present.
|
Converts strings (and format settings) from the system codepage to UTF-8. |
|
Version 4.0 | Generated 2025-05-03 | Home |