Java Array Trim trimArray(char[] buffer, int read)

Here you can find the source of trimArray(char[] buffer, int read)

Description

trim Array

License

Apache License

Declaration

private static char[] trimArray(char[] buffer, int read) 

Method Source Code

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

import java.util.Arrays;

public class Main {
    private static char[] trimArray(char[] buffer, int read) {
        if (buffer.length != read) {
            return Arrays.copyOf(buffer, read);
        } else {/* w  w w .  jav a 2  s .  c  o  m*/
            return buffer;
        }
    }
}

Related

  1. trim(String[] array)
  2. trim(String[] array)
  3. trim(String[] data)
  4. trim(String[] s)
  5. trim(String[] strings)
  6. trimArray(final byte[] seq, final int trimFromFront, final int trimFromBack)
  7. trimBytes(byte[] source, int fromIndex, int toIndex)
  8. trimLeadingZeros(byte[] original)
  9. trimLeft(byte[] src, int trimSize)