VirtualBox

Changeset 16324 in vbox for trunk/include/VBox/com


Ignore:
Timestamp:
Jan 28, 2009 6:06:59 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42159
Message:

COM: teach Utf8Str substr() like std::string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/string.h

    r15051 r16324  
    442442    const char *raw() const { return str; }
    443443
     444    /** The same as operator const char *(), but for situations where the compiler
     445        cannot typecast implicitly (for example, in printf() argument list). */
     446    const char *c_str() const { return str; }
     447
    444448    /**
    445449     *  Returns a non-const raw pointer that allows to modify the string directly.
     
    495499        return *this;
    496500    }
     501
     502    static const size_t npos;
     503
     504    Utf8Str substr(size_t pos = 0, size_t n = npos) const;
    497505
    498506    /**
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette