This patch add a text token replacer function and a filter text token function. The 2 functions are generic and utilize a structure containing information about the tokens they look for and they must be provided with functions that are specific to the use you intend. StringReplacer - uses the struct and String_Replacer_IsLegal and String_Replacer_DoCalc to filter and replace text tokens that the list passed in contains. The text tokens can be of variable lengths and can be marked that the replacement text is a calculated value such that you could randomize some text based on a particular value present. StringFilter - uses the passed in structure to filter out the text tokens specified based on whether String_Replacer_DoFilter return true or false. both StringReplacer and FilterString allow you to pass user specified data that is passed to the 3 functions that one can set for them. String_Replacer_IsLegal and String_Replacer_DoCalc are only used with StringReplacer and must be set when the function is called if they are not then the function will return with out doing any modification and the returned string will be empty. String_Replacer_DoFilter is only used with FilterString and it tells FilterString wether or not the text token it found should be filtered. the text token structure that the two functions use is defined as: struct parse_struct { char *code; /* holds the tag after the start character */ void *user_type; /* holds user specified type for this token */ char *real_code; /* actual code for tage or \0 for a calculateded code */ }; the text token structure that the two functions use is defined as: code is the particular text token it's looking for. user_type hold a user specified type where it be an integer or structure. real_code is the text that will be substituted unless under type For an example of the use of these functions look at the stringreplacer.color.patch file it utilizes the functions to replace and filter color codes. any problems or questions you can email me at abbadon@mac.com