MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / urlPrep

Method urlPrep

src/main/java/util/StringUtils.java:111–124  ·  view source on GitHub ↗
(String src)

Source from the content-addressed store, hash-verified

109 }
110
111 public static String urlPrep(String src){
112 String mask=" #$%&/:;<=>?@[\\]^'{|}";
113 StringBuffer out=new StringBuffer();
114
115 for (int i=0; i<src.length(); i++) {
116 char s=src.charAt(i);
117
118 if (mask.indexOf(s)<0) { out.append(s); continue; }
119
120 out.append('%').append(hexByteToString((byte)s));
121 }
122
123 return out.toString();
124 }
125
126 public static Vector parseMessage(String value, int availWidth, Font font) {
127 StringBuffer out=new StringBuffer(value);

Callers

nothing calls this directly

Calls 3

hexByteToStringMethod · 0.95
appendMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected