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 General Public License
21 // along with this program; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 #include <simgear/compiler.h>
41 // * atof() wrapper for "string" type
44 // atof( const string& str )
46 // return ::atof( str.c_str() );
50 // * atoi() wrapper for "string" type
53 // atoi( const string& str )
55 // return ::atoi( str.c_str() );
59 * Strip leading and/or trailing whitespace from s.
60 * @param s String to strip.
61 * @return The stripped string.
63 std::string lstrip( const std::string& s );
64 std::string rstrip( const std::string& s );
65 std::string strip( const std::string& s );
68 * Split a string into a words using 'sep' as the delimiter string.
69 * Produces a result similar to the perl and python functions of the
72 * @param s The string to split into words,
73 * @param sep Word delimiters. If not specified then any whitespace is a separator,
74 * @param maxsplit If given, splits at no more than maxsplit places,
75 * resulting in at most maxsplit+1 words.
76 * @return Array of words.
78 std::vector<std::string>
79 split( const std::string& s,
83 } // end namespace strutils
84 } // end namespace simgear