Changeset 12504
- Timestamp:
- 2006-08-23T17:17:29+12:00 (18 years ago)
- Location:
- trunk/gsdl/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/text_t.cpp
r10140 r12504 26 26 *********************************************************************/ 27 27 28 /*29 $Log$30 Revision 1.25 2005/06/16 22:49:44 kjdon31 added starts_with and ends_with functions32 33 Revision 1.24 2005/04/07 04:27:18 kjdon34 added some x++ -> ++x changes submitted by Emanuel Dejanu35 36 Revision 1.23 2004/12/02 22:21:34 kjdon37 added some changes made by Emanuel Dejanu (Simple Words)38 39 Revision 1.22 2004/05/24 03:43:22 mdewsnip40 (Human Info) Added const text_t g_EmptyText("") to use instead of plain ol' "".41 42 Revision 1.21 2001/06/01 02:51:28 sjboddie43 Changes to get phind working under windows44 45 Revision 1.20 2001/01/25 18:26:44 cs02546 Included CORBA branch for first time47 48 Revision 1.15.2.2 2000/04/05 10:19:38 syeates49 added automatic conversion to allow text_t's to be <<'ed to ostreams50 51 Revision 1.15.2.1 2000/04/04 15:02:29 cs02552 Corba first commit53 54 Revision 1.15 1999/10/14 22:52:39 sjboddie55 joinchar can join using text_t string now too56 57 Revision 1.14 1999/09/24 02:30:03 rjmcnab58 added function has_unicode_letdig59 60 Revision 1.13 1999/09/07 04:57:43 sjboddie61 added gpl notice62 63 Revision 1.12 1999/08/31 08:04:41 rjmcnab64 Fixed a small but hard to find bug in getcarr65 66 Revision 1.11 1999/07/01 04:05:09 rjmcnab67 Optimised append functions slightly and added a reserve function.68 69 Revision 1.10 1999/04/26 03:58:03 sjboddie70 added is_number function71 72 Revision 1.9 1999/04/06 22:17:24 rjmcnab73 Added splits and joins using text_tset.74 75 Revision 1.8 1999/02/28 23:14:41 rjmcnab76 77 Added uc and lc to convert to uppercase and lowercase.78 79 Revision 1.7 1999/02/21 22:26:39 rjmcnab80 81 Made getint() a constant function.82 83 Revision 1.6 1999/02/03 01:13:26 sjboddie84 85 Got interface to handle subcollections and language subcollections -86 committed changes made to some of the collections87 88 Revision 1.5 1999/01/19 01:38:14 rjmcnab89 90 Made the source more portable.91 92 Revision 1.4 1999/01/12 01:51:00 rjmcnab93 94 Standard header.95 96 Revision 1.3 1999/01/08 02:33:16 rjmcnab97 98 Added standard header to source files.99 100 */101 102 28 #include "text_t.h" 103 29 … … 395 321 } 396 322 return first; 323 } 324 325 text_t::iterator findlastchar (text_t::iterator first, text_t::iterator last, 326 unsigned short c) 327 { 328 text_t::iterator current = last; 329 while (current != first) { 330 if (*current == c) break; 331 --current; 332 } 333 if (current == first) { 334 if (*current == c) return current; 335 return last; 336 } 337 338 return current; 397 339 } 398 340 -
trunk/gsdl/lib/text_t.h
r10140 r12504 224 224 text_t::iterator findchar (text_t::iterator first, text_t::iterator last, 225 225 unsigned short c); 226 226 text_t::iterator findlastchar (text_t::iterator first, text_t::iterator last, 227 unsigned short c); 227 228 text_t::iterator findword (text_t::iterator first, text_t::iterator last, 228 229 const text_t &word);
Note:
See TracChangeset
for help on using the changeset viewer.