
com.huaweicloud.dws.client.util.StringUtils Maven / Gradle / Ivy
package com.huaweicloud.dws.client.util;
/**
* @ProjectName: dws-connector
* @ClassName: StringUtils
* @Description:
* @Date: 2024/1/17 17:23
* @Version: 1.0
*/
public class StringUtils {
public static void split(String str, String[] values, String split) {
if (str == null) {
return;
}
int startIndex = 0;
int endIndex = 0;
int idx = 0;
while (idx < values.length) {
endIndex = str.indexOf(split, startIndex);
if (endIndex <= 0) {
break;
}
values[idx++] = str.substring(startIndex, endIndex);
startIndex = endIndex + 1;
}
if (idx < values.length && startIndex < str.length()) {
values[idx] = str.substring(startIndex);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy