Java String Split splitString(String hexString, int partSize)

Here you can find the source of splitString(String hexString, int partSize)

Description

split String

License

Open Source License

Declaration

public static List<String> splitString(String hexString, int partSize) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> splitString(String hexString, int partSize) {
        //Splits a String into pieces of length partSize
        List<String> parts = new ArrayList<>();
        int length = hexString.length();
        for (int i = 0; i < length; i += partSize) {
            parts.add(hexString.substring(i, Math.min(length, i + partSize)));
        }/*from  w  w w. j  av a2 s.c  o  m*/
        return parts;
    }
}

Related

  1. splitSQL(List list, String sql)
  2. splitSQLColumns(String sql)
  3. splitStep(String step)
  4. splitStr(String str, int toCount)
  5. splitString(String bigString, String splitter)
  6. splitString(String s)
  7. splitString(String s)
  8. splitString(String s)
  9. splitString(String src, String target)