Java BitSet Create bitSet(String string)

Here you can find the source of bitSet(String string)

Description

bit Set

License

Open Source License

Declaration

public static BitSet bitSet(String string) 

Method Source Code

//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;
    }
}

Related

  1. bitSet(byte[] bytes)
  2. bitSet(byte[] bytes)
  3. bitSetFrom(long number)
  4. bitsetFromIndices(int size, int... indices)
  5. bitsetFromString(String pixelsString)
  6. bitSetOf(long lowerBits, long upperBits)