MCPcopy Index your code
hub / github.com/Raxcl/RBlog / substring

Method substring

blog-api/src/main/java/cn/raxcl/util/StringUtils.java:51–65  ·  view source on GitHub ↗

截取字符串 @param str 原始字符串 @param start 起始位置 @param end 结束位置 @return String

(String str, int start, int end)

Source from the content-addressed store, hash-verified

49 * @return String
50 */
51 public static String substring(String str, int start, int end) {
52 if (str == null || "".equals(str)) {
53 return "";
54 }
55 if (start < 0 || end < 0) {
56 return str;
57 }
58 if (end > str.length()) {
59 end = str.length();
60 }
61 if (start >= end) {
62 return "";
63 }
64 return str.substring(start, end);
65 }
66
67 /**
68 * 获取堆栈信息

Callers 9

handleLogMethod · 0.95
handleLogMethod · 0.95
handleLogMethod · 0.95
tFunction · 0.80
live2d.min.jsFile · 0.80
processCommandMethod · 0.80
replyCommentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected