Java Char Convert To convertCharArrayToIntArray(char[] chars)

Here you can find the source of convertCharArrayToIntArray(char[] chars)

Description

convert Char Array To Int Array

License

Apache License

Declaration

private static int[] convertCharArrayToIntArray(char[] chars) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static int[] convertCharArrayToIntArray(char[] chars) {
        int[] nums = new int[chars.length];
        try {//from  w w w  . j a v  a2s .co m
            for (int i = 0; i < chars.length; i++) {
                nums[i] = Integer.parseInt(String.valueOf(chars[i]));
            }
        } catch (NumberFormatException e) {
            e.printStackTrace();
        }
        return nums;
    }
}

Related

  1. convertCharacter(final String value)
  2. convertCharacterEntity(String value)
  3. convertCharacterOffsetToCodePointOffset(String inputStr, int charOffset)
  4. convertCharacters(String fileName)
  5. convertCharArray(char[] arr)
  6. convertChars(String orig_name, String chars, char toChar)
  7. convertCharSet(String str, String desCharset)
  8. convertCharsToUnicodeChars(final String s, final boolean toLowerCase)
  9. convertCharToBoolean(final char value)