Sign in Join
FPDoc Onlineexperiment

GetEnvironmentStringUTF8 function

In unit LazUTF8

Returns a system environment string.

Declaration

pascal
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.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.