Example #1
0
DKStringW DKStringW::LastPathComponent(void) const
{
    DKStringW result = L"/";
    StringArray strs = PathComponents();
    size_t c = strs.Count();
    if (c > 0)
        result = strs.Value(c - 1);
    return result;
}
Example #2
0
DKStringW::RealNumberArray DKStringW::ToRealNumberArray(const DKStringW& delimiter, bool ignoreEmptyString) const
{
    StringArray strings = Split(delimiter, ignoreEmptyString);
    RealNumberArray result;
    result.Reserve(strings.Count());
    for (size_t i = 0; i < strings.Count(); ++i)
        result.Add(strings.Value(i).ToRealNumber());

    return result;
}