Changeset 665


Ignore:
Timestamp:
1999-10-15T11:52:39+13:00 (25 years ago)
Author:
sjboddie
Message:

joinchar can join using text_t string now too

Location:
trunk/gsdl/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/text_t.cpp

    r629 r665  
    2828/*
    2929   $Log$
     30   Revision 1.15  1999/10/14 22:52:39  sjboddie
     31   joinchar can join using text_t string now too
     32
    3033   Revision 1.14  1999/09/24 02:30:03  rjmcnab
    3134   added function has_unicode_letdig
     
    427430    {
    428431      if (!first) outtext.push_back (c);
     432      first = false;
     433      outtext += *here;
     434      here++;
     435    }
     436}
     437
     438void joinchar (const text_tarray &inlist, text_t c, text_t &outtext)
     439{
     440  outtext.clear ();
     441
     442  text_tarray::const_iterator here = inlist.begin ();
     443  text_tarray::const_iterator end = inlist.end ();
     444  bool first = true;
     445  while (here != end)
     446    {
     447      if (!first) outtext += c;
    429448      first = false;
    430449      outtext += *here;
  • trunk/gsdl/lib/text_t.h

    r629 r665  
    238238void joinchar (const text_tlist &inlist, unsigned short c, text_t &outtext);
    239239void joinchar (const text_tarray &inlist, unsigned short c, text_t &outtext);
     240void joinchar (const text_tarray &inlist, text_t c, text_t &outtext);
    240241
    241242// count the occurances of a character within a range
Note: See TracChangeset for help on using the changeset viewer.