pathsep
Returns the character that separates folders in a path string.
Category: Programming > Files and Folders
Syntax
s = pathsep
Returns ';' on Windows and ':' elsewhere.
Description
The separator appears in the result of path and genpath and in the arguments of addpath. Use pathsep when building or splitting such strings, for example strsplit(path, pathsep), instead of typing the character.
Output arguments
s- A one-character vector.
Example
Joining folders for a path
s = pathsep
joined = ['lib1' pathsep 'lib2']
Output
s = ';'
joined = 'lib1;lib2'