public static String substringTrimmed( String str, int beginIndex, int endIndex ) {
		beginIndex = trimBegin( str, beginIndex, endIndex );
		endIndex = trimEnd( str, beginIndex, endIndex );
		return (endIndex > beginIndex) ? str.substring( beginIndex, endIndex ) : "";
	}
This is equal to {@code str.substring( beginIndex ).trim()},
but avoids temporary untrimmed substring allocation.
If the trimmed string is empty, a shared empty string is returned.

@since 2
flatlaf-core/src/main/java/com/formdev/flatlaf/util/StringUtils.java