MCPcopy Create free account
hub / github.com/Bit0r/java-util / getStringToList

Method getStringToList

src/main/java/util/CommonUtils.java:396–404  ·  view source on GitHub ↗

字符串转list(从右到左截取) @param str 字符串 @param length 每次截取长度(List中的字符串长度) @return

(String str, Integer length)

Source from the content-addressed store, hash-verified

394 * @return
395 */
396 public static List<String> getStringToList(String str, Integer length) {
397 List<String> list = new ArrayList<>();
398 while (str.length() > length) {
399 list.add(str);
400 str = str.substring(0, str.length() - 2);
401 }
402 list.add(str);
403 return list;
404 }
405
406// /**
407// * 获取枚举 FieldName注解值

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected