E
Eric Kiernan
In one of my classes, I have a function called
stripString( string myStr, char toRemove ) which strips a specified
character from a string i pass it. ie, i format some text number as
currency, but then strip the $ sign from the text field. My problem is
that I need this function in more than one class. I know I could (1)
copy the function into the second class, or (2) create a static class
called general, and then call general.stripString(), but is there any
way to just have a function file, filled with public functions, and no
class, so that I could just call stripString()?
stripString( string myStr, char toRemove ) which strips a specified
character from a string i pass it. ie, i format some text number as
currency, but then strip the $ sign from the text field. My problem is
that I need this function in more than one class. I know I could (1)
copy the function into the second class, or (2) create a static class
called general, and then call general.stripString(), but is there any
way to just have a function file, filled with public functions, and no
class, so that I could just call stripString()?