00001 #ifndef STRING_MANIPULATION_CLASS
00002 #define STRING_MANIPULATION_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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 "ed_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
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