Wrapper of {@link String#trim()} and return FastStr type instance

@return a FastStr instance without leading and tail space characters
from this FastStr instance
7295
@Override
    public FastStr trim() {
        char[] value = this.buf;
        int len = end;
        int st = begin;
        char[] val = value;    /* avoid getfield opcode */

        while ((st < len) && (val[st] <= ' ')) {
            st++;
        }
        while ((st < len) && (val[len - 1] <= ' ')) {
            len--;
        }
        return ((st > begin) || (len < size())) ? new FastStr(value, st, len) : this;
    }
515694
public static String trimLeadingCharacter(String str, char leadingCharacter) {
        if (!hasLength(str)) {
            return str;
        }
        StringBuilder buf = new StringBuilder(str);
        while (buf.length() > 0 && buf.charAt(0) == leadingCharacter) {
            buf.deleteCharAt(0);
        }
        return buf.toString();
    }
763810
public static String trim(CharSequence input) {
      if (input == null) {
         return null;
      }
      return StringFunctions.TRIM.apply(input.toString());
   }
1110873
public JcString trimLeft() {
		JcString ret = new JcString(null, this,
				new FunctionInstance(FUNCTION.String.LTRIM, 1));
		QueryRecorder.recordInvocationConditional(this, "trimLeft", ret);
		return ret;
	}
252230
static
	public String trim(String string){
		int length = string.length();

		int trimmedLength = length;

		while(trimmedLength > 0){
			char c = string.charAt(trimmedLength - 1);

			if(!Character.isWhitespace(c)){
				break;
			}

			trimmedLength--;
		}

		if(trimmedLength < length){
			string = string.substring(0, trimmedLength);
		}

		return string;
	}
231206
public String getString() 
    {
        String strFinal = FirstMLastConverter.partsToName(m_recThis, m_iNamePrefix, m_iNameFirst, m_iNameMiddle, m_iNameSur, m_iNameSuffix, m_iNameTitle);
        int maxLength = this.getMaxLength();
        if (strFinal.length() > maxLength)
            strFinal = strFinal.substring(0, maxLength);    // Truncate to max length
        return strFinal;
    }
450989
function trimStringEnds(keyValueString, unwantedCharArray) {
    var unwantedBegCharIndex = 0;
    var unwantedEndCharIndex = keyValueString.length - 1;
    var charIsUnwanted;
    var keepGoing = true; //keep traversing the string
    //starting from the beginning of the string
    while (keepGoing) {
        charIsUnwanted = false;
        for (var x = 0; x < unwantedCharArray.length; x++) {
            if (keyValueString.charAt(unwantedBegCharIndex) === unwantedCharArray[x]) {
                charIsUnwanted = true;
            }
        }
        if (!charIsUnwanted) {
            keepGoing = false;
        } else {
            unwantedBegCharIndex++;
        }
    }
    //now start at the end
    keepGoing = true;
    while (keepGoing) {
        charIsUnwanted = false;
        for (var y = 0; y < unwantedCharArray.length; y++) {
            if (keyValueString.charAt(unwantedEndCharIndex) === unwantedCharArray[y]) {
                charIsUnwanted = true;
            }
        }
        if (!charIsUnwanted) {
            keepGoing = false;
        } else {
            unwantedEndCharIndex--;
        }
    }
    keyValueString = keyValueString.slice(unwantedBegCharIndex, unwantedEndCharIndex + 1);
    return keyValueString;
}
792709
protected String trim(String s) {
        if (s == null || s.length() == 0)
            return s;

        return s.trim();
    }
1242846
public static String trimTrailingCharacter(final String str, final char trailingCharacter) {
    if (!StringUtils.hasLength(str)) {
      return str;
    }

    final StringBuilder sb = new StringBuilder(str);
    while (sb.length() > 0 && sb.charAt(sb.length() - 1) == trailingCharacter) {
      sb.deleteCharAt(sb.length() - 1);
    }
    return sb.toString();
  }
1192526
public String getTypeRaw() {
        int pos = type.indexOf("<");
        return (pos < 0 ? type : type.substring(0, pos));
    }
624930
public static String trim(String value) {
    int start;
    int end;
    final int lengthMinusOne = value.length() - 1;
    for (start = 0; start <= lengthMinusOne; ++start) {
      if (!isSpace(value.charAt(start))) {
        break;
      }
    }
    for (end = lengthMinusOne; end >= start; --end) {
      if (!isSpace(value.charAt(end))) {
        break;
      }
    }
    if (start == 0 && end == lengthMinusOne) {
      return value;
    }
    if (start > lengthMinusOne) {
      return "";
    }
    return value.substring(start, end + 1);
  }
814891
public static String lTrim(final String value) {
        if (value == null) {
            return null;
        }

        String trimmed = value;
        int offset = 0;
        final int maxLength = value.length();
        while (offset < maxLength && (value.charAt(offset) == ' ' || value.charAt(offset) == '\t')) {
            offset++;
        }

        if (offset > 0) {
            trimmed = value.substring(offset);
        }

        return trimmed;
    }
420496
public float trimLastSpace()
    {
        BaseFont ft = font.getFont();
        if (ft.getFontType() == BaseFont.FONT_TYPE_CJK && ft.getUnicodeEquivalent(' ') != ' ') {
            if (value.length() > 1 && value.endsWith("\u0001")) {
                value = value.substring(0, value.length() - 1);
                return font.width('\u0001');
            }
        }
        else {
            if (value.length() > 1 && value.endsWith(" ")) {
                value = value.substring(0, value.length() - 1);
                return font.width(' ');
            }
        }
        return 0;
    }
1163117
public String trimTrailing(String str) {
        if (str == null) {
            return null;
        }

        int length = str.length();
        for (int i=length-1; i>=0; i--) {
            if (str.charAt(i) > ' ') {
                return str.substring(0, i + 1);
            }
        }

        return "";
    }
892771
def _trim(self, somestr):
        
        tmp = RE_LSPACES.sub("", somestr)
        tmp = RE_TSPACES.sub("", tmp)
        return str(tmp)
792145
private String trimLeadingSlashIfNeeded(String rawName) {
        if (rawName != null && rawName.startsWith("/")) {
            return rawName.substring(1);
        }
        return rawName;
    }
544470
public Separator trim(LineFormat.Trim trim) {
        return new Separator(separator, pattern, trim, skipEmpty, forNull, skipNull);
    }