tchmi_path

[ Function ]

function tchmi_path(path: string): string;

Restores / standardizes a path.

Replaces all backslashes with normal slashes, replaces multiple slashes with a single slash, removes leading slashes.

Parameter

Name

Type

Description

path

string

any variable

Return value

Type

Description

string

Standardized value

tchmi_path 1:

Available from 1.8

Sample - JavaScript

TcHmi.Log.debug(tchmi_path('\images///pumps\\pump.png')); 
// => 'images/pumps/pump.png'