00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "wvstringlist.h"
00011 #include "strutils.h"
00012
00013
00014 WvString WvStringList::join(const char *joinchars) const
00015 {
00016 return ::strcoll_join(*this, joinchars);
00017 }
00018
00019
00020 void WvStringList::split(WvStringParm s, const char *splitchars,
00021 int limit)
00022 {
00023 return ::strcoll_split(*this, s, splitchars, limit);
00024 }
00025
00026 void WvStringList::splitstrict(WvStringParm s, const char *splitchars,
00027 int limit)
00028 {
00029 return ::strcoll_splitstrict(*this, s, splitchars, limit);
00030 }
00031
00032 void WvStringList::fill(const char * const *array)
00033 {
00034 while (array && *array)
00035 {
00036 append(new WvString(*array), true);
00037 array++;
00038 }
00039 }
00040
00041
00042
00043
00044 WvString WvStringList::popstr()
00045 {
00046 if (isempty())
00047 return "";
00048
00049 WvString s = *first();
00050 unlink_first();
00051 return s;
00052 }