Mercurial Hosting > luan
comparison src/luan/modules/StringLuan.java @ 1384:f5368cd8c056
remove template expressions and String.concat
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 15 Aug 2019 14:33:35 -0600 |
parents | e0cf0d108a77 |
children | 01e38174d580 |
comparison
equal
deleted
inserted
replaced
1383:a3d0d1c2ce89 | 1384:f5368cd8c056 |
---|---|
206 // note - String.format() is too stupid to convert between ints and floats. | 206 // note - String.format() is too stupid to convert between ints and floats. |
207 public static String format(String format,Object... args) { | 207 public static String format(String format,Object... args) { |
208 return String.format(format,args); | 208 return String.format(format,args); |
209 } | 209 } |
210 | 210 |
211 public static String concat(Object... args) throws LuanException { | |
212 StringBuilder sb = new StringBuilder(); | |
213 for( Object arg : args ) { | |
214 sb.append( Luan.luanToString(arg) ); | |
215 } | |
216 return sb.toString(); | |
217 } | |
218 | |
219 public static String encode(String s) { | 211 public static String encode(String s) { |
220 return Luan.stringEncode(s); | 212 return Luan.stringEncode(s); |
221 } | 213 } |
222 | 214 |
223 public static Number to_number(String s,Integer base) throws LuanException { | 215 public static Number to_number(String s,Integer base) throws LuanException { |