comparison src/luan/modules/RegexLuan.java @ 1719:2f3a8f16f583

add regex.split
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 25 Jul 2022 14:31:48 -0600
parents b82767112d8e
children e59349d53fec
comparison
equal deleted inserted replaced
1718:5603ee8e2a71 1719:2f3a8f16f583
142 } 142 }
143 143
144 public boolean matches(String s) { 144 public boolean matches(String s) {
145 return pattern.matcher(s).find(); 145 return pattern.matcher(s).find();
146 } 146 }
147
148 public String[] split(String s,Integer limit) throws LuanException {
149 Utils.checkNotNull(s);
150 int n = limit==null ? -1 : limit;
151 return pattern.split(s,n);
152 }
147 } 153 }