📄 sysstring.h
字号:
boolean ge(const SysString& vector) const { return (compare(vector) != Integral::LESSER); } // other greater than or equal to methods // boolean ge(const unichar* value) const; // method: le // boolean le(const SysString& vector) const { return (compare(vector) != Integral::GREATER); } // other less than or equal to methods // boolean le(const unichar* value) const; // unichar comapre methods: // these methods give the number of characters equal or not equal // to the argument // long numEqual(unichar test_value) const; // method: numNotEqual // long numNotEqual(unichar test_value) const { return (length() - numEqual(test_value)); } //--------------------------------------------------------------------------- // // class-specific public methods: // indexing methods // //--------------------------------------------------------------------------- // method: operator() // unichar& operator()(long index) { return value_d[index]; } // method: operator() // const unichar& operator()(long index) const { return value_d[index]; } //--------------------------------------------------------------------------- // // class-specific public methods: // conversion methods // //--------------------------------------------------------------------------- // automatic type conversion methods // operator byte*() const; operator unichar*() const; // numeric conversion methods // boolean get(void*& arg) const; boolean get(boolean& arg) const; boolean get(byte& arg) const; boolean get(unichar& arg) const; boolean get(SysChar& arg) const; boolean get(ushort& arg) const; boolean get(ulong& arg) const; boolean get(ullong& arg) const; boolean get(short& arg) const; boolean get(long& arg) const; boolean get(llong& arg) const; boolean get(float& arg) const; boolean get(double& arg) const; template <class TIntegral> boolean get(SysComplex<TIntegral>& arg) const; //--------------------------------------------------------------------------- // // class-specific public methods: // size-related methods // //--------------------------------------------------------------------------- // method: length // long length() const { return isip_wcslen(value_d); } // size methods // long memSize() const; // capacity-related methods // boolean setCapacity(long cap); //--------------------------------------------------------------------------- // // class-specific public methods: // string manipulation methods // //--------------------------------------------------------------------------- // array-oriented methods // long getBuffer(unichar* buffer, long max) const; long getBuffer(byte* buffer, long max, SysChar::ENCODE encoding = SysChar::DEF_ENCODE) const; boolean substr(SysString& str, long offset, long num_elements = Integral::NO_POS) const; // insert/replace a substring into the string methods // boolean insert(const SysString& str, long index); boolean insert(const unichar* str, long index); boolean replace(const SysString& str, long index); boolean replace(const unichar* str, long index); boolean replace(const SysString& pattern, const SysString& new_stuff); boolean replaceAll(const SysString& pattern, const SysString& new_stuff); boolean deleteRange(long offset, long num_elements); // append to the end of the string methods // boolean concat(const SysString& str); boolean concat(const SysString& str1, const SysString& str2); // method: concat // boolean concat(const unichar* arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(unichar arg) { SysString temp; temp.assign(arg); return concat(temp); } // numeric concatenation methods: // these methods are similar to sprintf() in C // // method: concat // boolean concat(const void* arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(boolean arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const byte arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const ushort arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const ulong arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const ullong arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const short arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const long arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const llong arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const float arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // boolean concat(const double arg) { SysString temp; temp.assign(arg); return concat(temp); } // method: concat // template <class TIntegral> boolean concat(const SysComplex<TIntegral>& arg) { SysString temp; temp.assign(arg); return concat(temp); } // append to the end of the string methods with format // // method: concat // boolean concat(const SysString& arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const unichar* arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(unichar arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // numeric concatenation methods with format: // these methods are similar to sprintf() in C // // method: concat // boolean concat(const void* arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(boolean arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const byte arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const ushort arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const ulong arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const ullong arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const short arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const long arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const llong arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const float arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // boolean concat(const double arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // method: concat // template <class TIntegral> boolean concat(const SysComplex<TIntegral>& arg, const unichar* fmt) { SysString temp; temp.assign(arg, fmt); return concat(temp); } // trim away characters from string methods // boolean trim(); boolean trim(const SysString& chars); boolean trim(const unichar* chars); boolean trimLeft(); boolean trimLeft(const SysString& chars); boolean trimLeft(const unichar* chars); boolean trimRight(); boolean trimRight(const SysString& chars); boolean trimRight(const unichar* chars); // string case conversion methods // boolean toUpper(); boolean toLower(); boolean toMixed(); boolean toMixed(const SysString& sep_chrs); //--------------------------------------------------------------------------- // // class-specific public methods: // string search methods // //--------------------------------------------------------------------------- // method: firstStr // long firstStr(const unichar* str, long start = Integral::NO_POS) const { SysString temp(str); return firstStr(temp, start); } // other first string methods // long firstStr(const SysString& str, long start = Integral::NO_POS) const;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -