/** * Create a new XMLString from a Java string. * * * @param string Java String reference, which must be non-null. * * @return An XMLString object that wraps the String reference. */ public XMLString newstr(String string) { return new XMLStringDefault(string); }
/** * Converts all of the characters in this <code>String</code> to upper * case using the rules of the given locale. * @param locale use the case transformation rules for this locale * @return the String, converted to uppercase. * @see java.lang.Character#toUpperCase(char) * @see java.lang.String#toLowerCase(Locale) */ public XMLString toUpperCase(Locale locale) { return new XMLStringDefault(m_str.toUpperCase(locale)); }
/** * Converts all of the characters in this <code>String</code> to lower * case using the rules of the given <code>Locale</code>. * * @param locale use the case transformation rules for this locale * @return the String, converted to lowercase. * @see java.lang.Character#toLowerCase(char) * @see java.lang.String#toUpperCase(Locale) */ public XMLString toLowerCase(Locale locale) { return new XMLStringDefault(m_str.toLowerCase(locale)); }
/** * Converts all of the characters in this <code>String</code> to upper * case using the rules of the given locale. * @param locale use the case transformation rules for this locale * @return the String, converted to uppercase. * @see java.lang.Character#toUpperCase(char) * @see java.lang.String#toLowerCase(Locale) */ public XMLString toUpperCase(Locale locale) { return new XMLStringDefault(m_str.toUpperCase(locale)); }
/** * Concatenates the specified string to the end of this string. * * @param str the <code>String</code> that is concatenated to the end * of this <code>String</code>. * @return a string that represents the concatenation of this object's * characters followed by the string argument's characters. * @exception java.lang.NullPointerException if <code>str</code> is * <code>null</code>. */ public XMLString concat(String str) { return new XMLStringDefault(m_str.concat(str)); }
/** * Converts all of the characters in this <code>String</code> to lower * case using the rules of the default locale, which is returned * by <code>Locale.getDefault</code>. * <p> * * @return the string, converted to lowercase. * @see java.lang.Character#toLowerCase(char) * @see java.lang.String#toLowerCase(Locale) */ public XMLString toLowerCase() { return new XMLStringDefault(m_str.toLowerCase()); }
/** * Converts all of the characters in this <code>String</code> to lower * case using the rules of the given <code>Locale</code>. * * @param locale use the case transformation rules for this locale * @return the String, converted to lowercase. * @see java.lang.Character#toLowerCase(char) * @see java.lang.String#toUpperCase(Locale) */ public XMLString toLowerCase(Locale locale) { return new XMLStringDefault(m_str.toLowerCase(locale)); }
/** * Converts all of the characters in this <code>String</code> to lower * case using the rules of the default locale, which is returned * by <code>Locale.getDefault</code>. * <p> * * @return the string, converted to lowercase. * @see java.lang.Character#toLowerCase(char) * @see java.lang.String#toLowerCase(Locale) */ public XMLString toLowerCase() { return new XMLStringDefault(m_str.toLowerCase()); }
/** * Concatenates the specified string to the end of this string. * * @param str the <code>String</code> that is concatenated to the end * of this <code>String</code>. * @return a string that represents the concatenation of this object's * characters followed by the string argument's characters. * @exception java.lang.NullPointerException if <code>str</code> is * <code>null</code>. */ public XMLString concat(String str) { return new XMLStringDefault(m_str.concat(str)); }
/** * Conditionally trim all leading and trailing whitespace in the specified String. * All strings of white space are * replaced by a single space character (#x20), except spaces after punctuation which * receive double spaces if doublePunctuationSpaces is true. * This function may be useful to a formatter, but to get first class * results, the formatter should probably do it's own white space handling * based on the semantics of the formatting object. * * @param trimHead Trim leading whitespace? * @param trimTail Trim trailing whitespace? * @param doublePunctuationSpaces Use double spaces for punctuation? * @return The trimmed string. */ public XMLString fixWhiteSpace(boolean trimHead, boolean trimTail, boolean doublePunctuationSpaces) { return new XMLStringDefault(m_str.trim()); }
/** * Returns a new string that is a substring of this string. The * substring begins at the specified <code>beginIndex</code> and * extends to the character at index <code>endIndex - 1</code>. * Thus the length of the substring is <code>endIndex-beginIndex</code>. * * @param beginIndex the beginning index, inclusive. * @param endIndex the ending index, exclusive. * @return the specified substring. * @exception IndexOutOfBoundsException if the * <code>beginIndex</code> is negative, or * <code>endIndex</code> is larger than the length of * this <code>String</code> object, or * <code>beginIndex</code> is larger than * <code>endIndex</code>. */ public XMLString substring(int beginIndex, int endIndex) { return new XMLStringDefault(m_str.substring(beginIndex, endIndex)); }
/** * Returns a new string that is a substring of this string. The * substring begins with the character at the specified index and * extends to the end of this string. <p> * Examples: * <blockquote><pre> * "unhappy".substring(2) returns "happy" * "Harbison".substring(3) returns "bison" * "emptiness".substring(9) returns "" (an empty string) * </pre></blockquote> * * @param beginIndex the beginning index, inclusive. * @return the specified substring. * @exception IndexOutOfBoundsException if * <code>beginIndex</code> is negative or larger than the * length of this <code>String</code> object. */ public XMLString substring(int beginIndex) { return new XMLStringDefault(m_str.substring(beginIndex)); }
/** * Create a XMLString from a FastStringBuffer. * * * @param string FastStringBuffer reference, which must be non-null. * @param start The start position in the array. * @param length The number of characters to read from the array. * * @return An XMLString object that wraps the FastStringBuffer reference. */ public XMLString newstr(char[] string, int start, int length) { return new XMLStringDefault(new String(string, start, length)); }
/** * Returns a new string that is a substring of this string. The * substring begins at the specified <code>beginIndex</code> and * extends to the character at index <code>endIndex - 1</code>. * Thus the length of the substring is <code>endIndex-beginIndex</code>. * * @param beginIndex the beginning index, inclusive. * @param endIndex the ending index, exclusive. * @return the specified substring. * @exception IndexOutOfBoundsException if the * <code>beginIndex</code> is negative, or * <code>endIndex</code> is larger than the length of * this <code>String</code> object, or * <code>beginIndex</code> is larger than * <code>endIndex</code>. */ public XMLString substring(int beginIndex, int endIndex) { return new XMLStringDefault(m_str.substring(beginIndex, endIndex)); }
/** * Conditionally trim all leading and trailing whitespace in the specified String. * All strings of white space are * replaced by a single space character (#x20), except spaces after punctuation which * receive double spaces if doublePunctuationSpaces is true. * This function may be useful to a formatter, but to get first class * results, the formatter should probably do it's own white space handling * based on the semantics of the formatting object. * * @param trimHead Trim leading whitespace? * @param trimTail Trim trailing whitespace? * @param doublePunctuationSpaces Use double spaces for punctuation? * @return The trimmed string. */ public XMLString fixWhiteSpace(boolean trimHead, boolean trimTail, boolean doublePunctuationSpaces) { return new XMLStringDefault(m_str.trim()); }
/** * Returns a new string that is a substring of this string. The * substring begins with the character at the specified index and * extends to the end of this string. <p> * Examples: * <blockquote><pre> * "unhappy".substring(2) returns "happy" * "Harbison".substring(3) returns "bison" * "emptiness".substring(9) returns "" (an empty string) * </pre></blockquote> * * @param beginIndex the beginning index, inclusive. * @return the specified substring. * @exception IndexOutOfBoundsException if * <code>beginIndex</code> is negative or larger than the * length of this <code>String</code> object. */ public XMLString substring(int beginIndex) { return new XMLStringDefault(m_str.substring(beginIndex)); }
/** * Converts all of the characters in this <code>String</code> to upper * case using the rules of the default locale, which is returned * by <code>Locale.getDefault</code>. * * <p> * If no character in this string has a different uppercase version, * based on calling the <code>toUpperCase</code> method defined by * <code>Character</code>, then the original string is returned. * <p> * Otherwise, this method creates a new <code>String</code> object * representing a character sequence identical in length to the * character sequence represented by this <code>String</code> object and * with every character equal to the result of applying the method * <code>Character.toUpperCase</code> to the corresponding character of * this <code>String</code> object. <p> * Examples: * <blockquote><pre> * "Fahrvergnügen".toUpperCase() returns "FAHRVERGNÜGEN" * "Visit Ljubinje!".toUpperCase() returns "VISIT LJUBINJE!" * </pre></blockquote> * * @return the string, converted to uppercase. * @see java.lang.Character#toUpperCase(char) * @see java.lang.String#toUpperCase(Locale) */ public XMLString toUpperCase() { return new XMLStringDefault(m_str.toUpperCase()); }
return new XMLStringDefault(m_str.trim());
public XMLString getStringValue(int nodeHandle) { return new XMLStringDefault(getStringValueX(nodeHandle)); }
/** * Create a XMLString from a FastStringBuffer. * * * @param fsb FastStringBuffer reference, which must be non-null. * @param start The start position in the array. * @param length The number of characters to read from the array. * * @return An XMLString object that wraps the FastStringBuffer reference. */ public XMLString newstr(FastStringBuffer fsb, int start, int length) { return new XMLStringDefault(fsb.getString(start, length)); }