diff options
author | Troy A. Griffitts <scribe@crosswire.org> | 2007-05-22 20:16:04 +0000 |
---|---|---|
committer | Troy A. Griffitts <scribe@crosswire.org> | 2007-05-22 20:16:04 +0000 |
commit | 71073745dfb439f6b3635cfdf5c0599b2032f438 (patch) | |
tree | 42f73cff4c847176bd408ac561275525c92b69d5 | |
parent | cc0ac51d3a7e4dd8ea61a0279ec31d429436da38 (diff) | |
download | sword-tools-71073745dfb439f6b3635cfdf5c0599b2032f438.tar.gz |
Added stripping of punctuation
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@86 07627401-56e2-0310-80f4-f8cd0041bdcd
-rw-r--r-- | flashtools/flash.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/flashtools/flash.cpp b/flashtools/flash.cpp index 49468bc..48cd078 100644 --- a/flashtools/flash.cpp +++ b/flashtools/flash.cpp @@ -104,6 +104,8 @@ int main(int argc, char **argv) SWBuf strong = word->second["Lemma"]; SWBuf text = word->second["Text"]; text.trim(); + // trim punctuation from end + while (text.size() && (strchr(".;,?-!\"()[]{}':/\t\r\n ", text[text.size()-1]))) text.setSize(text.size()-1); if (!text.size()) text = "[Untranslated]"; strong << 1; wordList[atoi(strong.c_str())].freq++; |