Goto main content

extention

Return the length of an expression.

EXTENTION

NAME

extention - Returns the length of an expression.

SYNOPSIS

extention ("file", …)

DESCRIPTION

This function returns the extension of a file, that is the type of the file. If multiple files are specified at the beginning, it returns an array containing all the extensions.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

res={_{ extension("toto.txt"); }}. return res=txt.
res={_{ extension("toto"); }}. return res=.
res={_{ extension(); }}. return res=.
res={_{ extension("1.txt","2.a","3.xls","4"); }}. return res=["txt","a","xls",""].

SEE ALSO

{{ include("includes/files.sn") }}

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.