mirror of
https://github.com/OpenSPG/openspg.git
synced 2025-11-30 09:10:33 +00:00
impl split_part
This commit is contained in:
parent
99f8bc3cad
commit
62cbbef0de
@ -18,8 +18,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class SplitPart {
|
||||
@UdfDefine(name = "split_part", compatibleName = "SplitPart")
|
||||
public String split(String str, String delim, Integer partNum) throws Exception {
|
||||
String[] strings = StringUtils.split(str, delim);
|
||||
public String split(String str, String separator, Integer partNum) throws Exception {
|
||||
String[] strings = StringUtils.split(str, separator);
|
||||
int length = strings.length;
|
||||
if (partNum < 0) {
|
||||
partNum = length - 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user