Navigation

Operators and Keywords

Function List:

C++ API

Built-in Function: tilde_expand (string)

Perform tilde expansion on string.

If string begins with a tilde character, (‘~’), all of the characters preceding the first slash (or all characters, if there is no slash) are treated as a possible user name, and the tilde and the following characters up to the slash are replaced by the home directory of the named user. If the tilde is followed immediately by a slash, the tilde is replaced by the home directory of the user running Octave.

For example:

tilde_expand ("~joeuser/bin")
    ⇒ "/home/joeuser/bin"
tilde_expand ("~/bin")
    ⇒ "/home/jwe/bin"

Package: octave