Mercurial Hosting > luan
comparison core/src/luan/modules/HtmlLuan.java @ 646:cdc70de628b5
simplify LuanException
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Mar 2016 19:58:39 -0600 |
parents | a3c1e11fb6aa |
children |
comparison
equal
deleted
inserted
replaced
645:859c0dedc8b6 | 646:cdc70de628b5 |
---|---|
12 import luan.LuanException; | 12 import luan.LuanException; |
13 | 13 |
14 | 14 |
15 public final class HtmlLuan { | 15 public final class HtmlLuan { |
16 | 16 |
17 public static String encode(LuanState luan,String s) throws LuanException { | 17 public static String encode(String s) throws LuanException { |
18 Utils.checkNotNull(luan,s); | 18 Utils.checkNotNull(s); |
19 char[] a = s.toCharArray(); | 19 char[] a = s.toCharArray(); |
20 StringBuilder buf = new StringBuilder(); | 20 StringBuilder buf = new StringBuilder(); |
21 for( int i=0; i<a.length; i++ ) { | 21 for( int i=0; i<a.length; i++ ) { |
22 char c = a[i]; | 22 char c = a[i]; |
23 switch(c) { | 23 switch(c) { |