Here you can find the source of bitSet(String string)
public static BitSet bitSet(String string)
//package com.java2s; import java.util.BitSet; public class Main { public static BitSet bitSet(String string) { BitSet result = new BitSet(); for (int i = string.length(); --i >= 0;) result.set(string.charAt(i)); return result; }/*from w ww . j a v a 2s . com*/ public static StringBuilder set(StringBuilder result, String string) { result.setLength(0); result.append(string); return result; } public static StringBuilder set(StringBuilder result, StringBuilder string) { result.setLength(0); result.append(string); return result; } }