class interface KL_EXECUTION_ENVIRONMENT
feature(s) from KL_IMPORTED_STRING_ROUTINES
-- Access
STRING_: KL_STRING_ROUTINES
-- Routines that ought to be in class STRING
ensure
string_routines_not_void: Result /= Void
feature(s) from KL_EXECUTION_ENVIRONMENT
-- Access
variable_value (a_variable: STRING): STRING
-- Value of environment variable a_variable;
-- Void if a_variable has not been set
require
a_variable_not_void: a_variable /= Void
feature(s) from KL_EXECUTION_ENVIRONMENT
-- Setting
set_variable_value (a_variable, a_value: STRING)
-- Set environment variable a_variable to a_value.
-- (This setting may fail on certain platforms.)
require
a_variable_not_void: a_variable /= Void;
a_variable_not_empty: not a_variable.empty;
a_value_not_void: a_value /= Void
feature(s) from KL_EXECUTION_ENVIRONMENT
-- Conversion
interpreted_string (a_string: STRING): STRING
-- String where the environment variables have been
-- replaced by their values. The environment variables
-- are considered to be either ${[^}]*} or $[a-zA-Z0-9_]+
-- and the dollar sign is escaped using $$. Non defined
-- environment variables are replaced by empty strings.
-- The result is not defined when a_string does not
-- conform to the conventions above.
-- Return a new string each time.
require
a_string_not_void: a_string /= Void
ensure
interpreted_string_not_void: Result /= Void
end of KL_EXECUTION_ENVIRONMENT