addext: add file extensions to file names

Description Usage Arguments Details Value Author(s) Examples

Description

addext intern DataIO function, checks for the right extension and adds it if necessary.

Usage

1
addext(filename, extension)

Arguments

filename

string, to be checked for correct extension

extension

Correct extension for filename.

Details

Files have special formats and therefor need to be saved with the correct extensions. addext is simply an auxiliary function to guarantee correct file name extensions

Value

Function returns a string containing the filename and the correct extension.

Author(s)

Michael Thrun

Examples

1
2
addext('hallo.data','data') #  'hallo.data'
addext('hallo','data')     #  'hallo.data'

aultsch/DataIO documentation built on May 14, 2019, 10:34 p.m.