mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
Support Tor on Android x86 (thanks to n8fr8).
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.briarproject.util;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Collection;
|
||||
|
||||
public class StringUtils {
|
||||
|
||||
@@ -13,6 +14,15 @@ public class StringUtils {
|
||||
return s == null || s.length() == 0;
|
||||
}
|
||||
|
||||
public static String join(Collection<String> strings, String separator) {
|
||||
StringBuilder joined = new StringBuilder();
|
||||
for(String s : strings) {
|
||||
if(joined.length() > 0) joined.append(separator);
|
||||
joined.append(s);
|
||||
}
|
||||
return joined.toString();
|
||||
}
|
||||
|
||||
public static byte[] toUtf8(String s) {
|
||||
try {
|
||||
return s.getBytes("UTF-8");
|
||||
|
||||
Reference in New Issue
Block a user