6 // Written by Bernie Bright, started 1998
8 // Copyright (C) 1998 Bernie Bright - bbright@bigpond.net.au
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Library General Public
12 // License as published by the Free Software Foundation; either
13 // version 2 of the License, or (at your option) any later version.
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Library General Public License for more details.
20 // You should have received a copy of the GNU Library General Public
21 // License along with this library; if not, write to the
22 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 // Boston, MA 02111-1307, USA.
31 #include <simgear/compiler.h>
38 #ifdef SG_HAVE_STD_INCLUDES
50 // * atof() wrapper for "string" type
53 // atof( const string& str )
55 // return ::atof( str.c_str() );
59 // * atoi() wrapper for "string" type
62 // atoi( const string& str )
64 // return ::atoi( str.c_str() );
68 * Strip leading and/or trailing whitespace from s.
69 * @param s String to strip.
70 * @return The stripped string.
72 string lstrip( const string& s );
73 string rstrip( const string& s );
74 string strip( const string& s );
77 * Split a string into a words using 'sep' as the delimiter string.
78 * Produces a result similar to the perl and python functions of the
81 * @param s The string to split into words,
82 * @param sep Word delimiters. If not specified then any whitespace is a separator,
83 * @param maxsplit If given, splits at no more than maxsplit places,
84 * resulting in at most maxsplit+1 words.
85 * @return Array of words.
88 split( const string& s,
92 } // end namespace strutils
93 } // end namespace simgear