1Strings.trim(3kaya)          Kaya module reference         Strings.trim(3kaya)
2
3
4

NAME

6       Strings::trim - Trim selected characters from both ends of a String
7

SYNOPSIS

9       Void trim( var String x, Bool(Char) fn=isSpace )
10

ARGUMENTS

12       x The string to trim
13
14       fn The trimming function. Returns true if characters should be trimmed,
15       false otherwise. The default function is Prelude.isSpace (3kaya)  which
16       trims whitespace.
17

DESCRIPTION

19       Remove  characters in-place from both ends of a String as determined by
20       the trimming function.
21
22
23    str = "  this string needs trimming   ";
24    trim(str);
25    // str = "this string needs trimming";
26

AUTHORS

28       Kaya  standard  library  by  Edwin  Brady,  Chris  Morris  and   others
29       (kaya@kayalang.org). For further information see http://kayalang.org/
30

LICENSE

32       The  Kaya  standard  library  is free software; you can redistribute it
33       and/or modify it under the terms  of  the  GNU  Lesser  General  Public
34       License  (version  2.1  or  any later version) as published by the Free
35       Software Foundation.
36
38       Strings.ltrim (3kaya)
39       Strings.rtrim (3kaya)
40
41
42
43Kaya                             December 2010             Strings.trim(3kaya)
Impressum