A container for string replacements. More...
Public Member Functions | |
FUNCTION_AS_ZSTRING_PTR | add (BYREF_AS_STRING, BYREF_AS_STRING) |
Add a new element pair. More... | |
FUNCTION_AS_ZSTRING_PTR | rep (BYREF_AS_STRING) |
Search for a string, get its replacement (if any) More... | |
Public Attributes | |
STRING | O |
The output (a list of counters and strings) More... | |
STRING | I = MKl(0) & CHR(1) |
The input (a list of strings to search for) More... | |
A container for string replacements.
This class is to store two tables, one of search strings and a second one of their replacements. It's used to collect the links from the original source and replace symbol names in the emitter output, as well as referenced line numbers and #INCLUDE
files.
Definition at line 21 of file fbdoc_emit_syntax.bi.
FUNCTION_AS_ZSTRING_PTR RepData::add | ( | BYREF_AS_STRING | S, |
BYREF_AS_STRING | R | ||
) |
Add a new element pair.
S | The string to search for |
R | The string to replace with |
Add a new pair of strings to the container tables. The function checks if the search string contains illegal characters or if it's already defined. In this cases nothing happens and an error message gets returned. Otherwise the search string and its replacement gets stored in the container.
The search string must not contain characters in the range CHR(0) to CHR(2).
Definition at line 43 of file fbdoc_emit_syntax.bas.
FUNCTION_AS_ZSTRING_PTR RepData::rep | ( | BYREF_AS_STRING | S | ) |
Search for a string, get its replacement (if any)
S | The string to search for |
This function searches for the string given as parameter. If the string is in the search words, a pointer to it's replacement gets returned. Otherwise a pointer to the original string gets returned.
The function searches case sensitive.
Definition at line 62 of file fbdoc_emit_syntax.bas.
STRING RepData::O |
The output (a list of counters and strings)
Definition at line 23 of file fbdoc_emit_syntax.bi.
STRING RepData::I = MKl(0) & CHR(1) |
The input (a list of strings to search for)
Definition at line 24 of file fbdoc_emit_syntax.bi.