string_manipulation.h

Go to the documentation of this file.
00001 #ifndef STRING_MANIPULATION_CLASS
00002 #define STRING_MANIPULATION_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : string_manipulation                                               *
00007 *  Author : Chris Koeritz                                                     *
00008 *  Author : Brit Minor                                                        *
00009 *  Author : Aaron Buchanan                                                    *
00010 *                                                                             *
00011 *******************************************************************************
00012 * Copyright (c) 2000-$now By Author.  This program is free software; you can  *
00013 * redistribute it and/or modify it under the terms of the GNU General Public  *
00014 * License as published by the Free Software Foundation; either version 2 of   *
00015 * the License or (at your option) any later version.  This is online at:      *
00016 *     http://www.fsf.org/copyleft/gpl.html                                    *
00017 * Please send any updates to: fred@gruntose.com                               *
00018 \*****************************************************************************/
00019 
00020 #include "textual_dll.h"
00021 
00023 
00024 class TEXTUAL_CLASS_STYLE string_manipulation
00025 {
00026 public:
00027   static istring make_random_name(int min = 1, int max = 64);
00029 
00032   static bool quote_string(const istring &to_modify, istring &quoted_string);
00034 
00039   static istring long_line(char line_item = '/', int repeat = 76);
00041 
00045   static istring indentation(int spaces);
00047 
00048   static istring &escape_chars(istring &input_string);
00050 
00053   static istring &unescape_chars(istring &input_string);
00055 
00058   static bool substring(const istring &look_in, const istring &after, 
00059                         const istring &before, istring &found);
00061 
00066   static void carriage_returns_to_spaces(istring &to_strip);
00068 
00072   static void split_lines(const istring &input, istring &output,
00073           int min_column = 0, int max_column = 79);
00075 
00079 
00080 
00081   // numerical manipulation functions:
00082 
00083   static byte char_to_hex(char to_convert);
00085 
00086   static char hex_to_char(byte to_convert);
00088   
00089   static byte_array string_to_hex(const istring &character_form);
00091 
00095   static istring hex_to_string(const byte_array &byte_form);
00097 
00100 
00101 
00102 private:
00103   static const istring_object &splitter_finding_set();
00104 };
00105 
00106 #endif
00107 

Generated on Fri Nov 21 04:29:59 2008 for HOOPLE Libraries by  doxygen 1.5.1