35 static const char oName[] =
"Strong's Numbers";
36 static const char oTip[] =
"Toggles Strong's Numbers On and Off if they exist";
40 static const StringList oVals(&choices[0], &choices[2]);
58 bool lastspace =
false;
63 unsigned int textStart = 0, textEnd = 0;
71 for (text =
""; *from; from++) {
78 textEnd = (
unsigned int)text.
size();
83 if (*token ==
'W' && (token[1] ==
'G' || token[1] ==
'H')) {
86 for (
unsigned int i = 1; ((token[i]) && (i < 150)); i++)
89 if (atoi((!isdigit(*val))?val+1:val) < 5627) {
91 sprintf(wordstr,
"%03d", word++);
96 tmp.
append(text.
c_str()+textStart, (int)(textEnd - textStart));
102 sprintf(wordstr,
"%03d", word-1);
109 if ((from[1] ==
' ') || (from[1] ==
',') || (from[1] ==
';') || (from[1] ==
'.') || (from[1] ==
'?') || (from[1] ==
'!') || (from[1] ==
')') || (from[1] ==
'\'') || (from[1] ==
'\"')) {
113 if (newText) {textStart = (
unsigned int)text.
size(); newText =
false; }
118 if ((*token ==
'W') && (token[1] ==
'T')) {
120 for (
unsigned int i = 2; ((token[i]) && (i < 150)); i++)
123 sprintf(wordstr,
"%03d", word-1);
133 if (newText) {textStart = (
unsigned int)text.
size(); newText =
false; }
138 token[tokpos++] = *from;
145 lastspace = (*from ==
' ');
#define SWORD_NAMESPACE_START
virtual char processText(SWBuf &text, const SWKey *key=0, const SWModule *module=0)
static const StringList * oValues()
const char * c_str() const
std::list< SWBuf > StringList
SWBuf & append(const char *str, long max=-1)
static const char oName[]
unsigned long size() const
virtual bool isProcessEntryAttributes() const
virtual AttributeTypeList & getEntryAttributes() const
static const char * choices[4]
#define SWORD_NAMESPACE_END