[Overview][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'LazUTF8' (#lazutils)

GetEnvironmentStringUTF8

Returns a system environment string.

Declaration

Source position: lazutf8.pas line 71

function GetEnvironmentStringUTF8(

  Index: Integer

):string;

Arguments

Index

  

Position for the environment variable.

Function result

Value for the environment variable at the specified position.

Description

Returns a UTF-8-encoded system environment string stored at the specified position. The value in Index is in the range 1..GetEnvironmentVariableCountUTF8. For Unix and Windows the string normally is in the form 'name=value'. Beware that Windows knows some special formats, e.g. '=C:=SomePath'. Nota bene: Raymond Chen called these "bookkeeping variables" which emulate the MS-DOS tracking mechanism for the current directory on different drives.

Use GetEnvironmentVariableUTF8 to lookup values for environment variables by name.


Version 3.2 Generated 2024-02-25 Home