inline void toRxstring(RXSTRING &r) { r.strptr = getWritableData(); r.strlength = size_v(getBLength()); }
inline void toRxstring(CONSTRXSTRING &r) { r.strptr = getStringData(); r.strlength = size_v(getBLength()); } // no encoding support, so better to use blength
// in behaviour RexxInteger *RexxString::wordLength(RexxInteger *position) { return StringUtil::wordLength(getStringData(), getBLength(), position); }
// in behaviour RexxInteger *RexxString::caselessWordPos(RexxString *phrase, RexxInteger *pstart) { return StringUtil::caselessWordPos(getStringData(), getBLength(), phrase, pstart); }
/** * Returns an array of all words contained in the given range * of the string, using the same extraction rules used * for subWord() and word(). * * @param position The optional starting position. If not provided, extraction * starts with the first word. * @param plength The number of words to extract. If omitted, will extract * from the starting postion to the end of the string. * * @return An array containing the extracted words. If no words are * available within the given range, this returns an empty * array. */ RexxArray *RexxString::subWords(RexxInteger *position, RexxInteger *plength) { return StringUtil::subWords(getStringData(), getBLength(), position, plength); }