Java Integer Create toIntArray(String value)

Here you can find the source of toIntArray(String value)

Description

to Int Array

License

Open Source License

Declaration

public static int[] toIntArray(String value) 

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License"); you may

public class Main {
    public static int[] toIntArray(String value) {
        int[] intArray = null;

        if (value != null) {
            String[] splitValueArray = value.split(",");

            intArray = new int[splitValueArray.length];

            for (int index = 0; index < splitValueArray.length; ++index)
                intArray[index] = Integer.parseInt(splitValueArray[index].trim());
        }/* w  w  w. j  av a2  s.c  o m*/

        return intArray;
    }
}

Related

  1. toIntArray(long[] in)
  2. toIntArray(String intArray)
  3. toIntArray(String src)
  4. toIntArray(String str, String delimiter)
  5. toIntArray(String str, String separator)
  6. toIntArray(String[] anArray)
  7. toIntArray(String[] array)
  8. toIntArray(String[] ss)
  9. toIntArrayUnshifted(byte... arguments)