trim whitespace

From DavinciWiki
Jump to: navigation, search

Description

Remove leading/trailing spaces

Arguments and Return Values

Arguments: STRING/TEXT array Return Value: data with white spaces removed

Usage

Syntax: trim_whitespace(data, [,leading=BOOL][,trailing=BOOL])

data - string or text array

leading - trim the leading whitespace (default = 1)

trailing - trim the leading whitespace (default = 1)

Examples

dv> a=" Hello World    "
" Hello World    "
dv> b=trim_whitespace(a)
"Hello World"
dv> b=trim_whitespace(a,trailing=0)
"Hello World    "
dv> b=trim_whitespace(a,leading=0)
" Hello World"

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 04-12-2013
Modified On: 04-12-2013

Personal tools