Main Page   Class Hierarchy   Compound List   File List   Compound Members  

baStringUtil.h

00001 //////////////////////////////////////////////////////////////////////
00002 // Copyright (c) 2001-2002 David Pritchard <drpritch@alumni.uwaterloo.ca>
00003 // 
00004 // This program is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License
00006 // as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later
00008 // version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 #ifndef freecloth_base_baStringUtil_h
00020 #define freecloth_base_baStringUtil_h
00021 
00022 #ifndef freecloth_base_package_h
00023 #include <freecloth/base/package.h>
00024 #endif
00025 
00026 #ifndef freecloth_base_types_h
00027 #include <freecloth/base/types.h>
00028 #endif
00029 
00030 FREECLOTH_NAMESPACE_START
00031 
00032 ////////////////////////////////////////////////////////////////////////////////
00033 /*!
00034  * \class BaStringUtil freecloth/base/baStringUtil.h
00035  * \brief Utilities for manipulating strings.
00036  *
00037  * These are very basic, aren't compliant with any good text processing
00038  * standards, can't handle Unicode, etc.
00039  */
00040 class BaStringUtil {
00041 public:
00042     // ----- static member functions -----
00043 
00044     //! Convert to lowercase.
00045     static String toLower( const String& );
00046     //! Convert to uppercase.
00047     static String toUpper( const String& );
00048     //! Convert to Float
00049     static Float toFloat( const String& );
00050     //! Convert to Int32
00051     static Int32 toInt32( const String& );
00052     //! Convert from UInt32
00053     static String fromUInt32( UInt32 );
00054     //! Convert from UInt32
00055     static String fromUInt32( UInt32, UInt32 zeroPad );
00056     //! Convert from Float
00057     static String fromFloat( Float );
00058     //! Convert from Float
00059     static String fromFloat( Float, UInt32 nbFracDigits );
00060 };
00061 
00062 FREECLOTH_NAMESPACE_END
00063  
00064 #endif

Generated on Wed Apr 23 15:58:45 2003 for Freecloth by doxygen1.3-rc3