- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for substringFromLast (0.09 sec)
-
src/test/java/org/codelibs/core/lang/StringUtilTest.java
assertEquals("ab", StringUtil.substringFromLast("abc", "c")); assertEquals("abcab", StringUtil.substringFromLast("abcabc", "c")); assertEquals("abc", StringUtil.substringFromLast("abc", "")); assertEquals("abc", StringUtil.substringFromLast("abc", null)); assertEquals("abc", StringUtil.substringFromLast("abc", "dddd")); } /** * @throws Exception
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 12K bytes - Viewed (0) -
src/main/java/org/codelibs/core/lang/StringUtil.java
* 文字列の最後から指定した文字列で始まっている部分より手前を返します。 * * @param str * 文字列 * @param separator * セパレータ * @return 結果の文字列 */ public static String substringFromLast(final String str, final String separator) { if (isEmpty(str) || isEmpty(separator)) { return str; } final int pos = str.lastIndexOf(separator); if (pos == -1) {
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 21.7K bytes - Viewed (0)