Mercurial Hosting > luan
diff core/src/luan/modules/StringLuan.java @ 360:cbb94a7c7a9e
allow mail attachments;
add String.to_binary and Binary.to_string;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 15 Apr 2015 11:32:30 -0600 |
parents | 5e7450ac27f2 |
children | d55e873e1f0d |
line wrap: on
line diff
--- a/core/src/luan/modules/StringLuan.java Wed Apr 15 08:58:54 2015 -0600 +++ b/core/src/luan/modules/StringLuan.java Wed Apr 15 11:32:30 2015 -0600 @@ -70,6 +70,10 @@ return new String(a); } + @LuanMethod public static byte[] to_binary(String s) { + return s.getBytes(); + } + public static int len(LuanState luan,String s) throws LuanException { Utils.checkNotNull(luan,s); return s.length();