Java String Left left(String source, int length)

Here you can find the source of left(String source, int length)

Description

left

License

Open Source License

Declaration

public static String left(String source, int length) 

Method Source Code

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

public class Main {

    public static String left(String source, int length) {
        if (source == null) {
            return null;
        }/*from   w ww  .  ja  v  a  2  s  .  co  m*/
        return ((length > source.length()) ? source : source.substring(0,
                length));
    }
}

Related

  1. left(String s, int l)
  2. left(String s, int len)
  3. left(String s, int nCaratteri)
  4. left(String s, int size)
  5. left(String s, int width)
  6. left(String source, String searchFor)
  7. left(String source, String searchFor)
  8. left(String str, int count)
  9. left(String str, int len)