Java String Left left(String var0, int var1)

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

Description

left

License

Open Source License

Declaration

public static String left(String var0, int var1) 

Method Source Code

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

public class Main {
    public static String left(String var0, int var1) {
        return var0 == null ? null : (var1 < 0 ? "" : (var0.length() <= var1 ? var0 : var0.substring(0, var1)));
    }/*from w ww. j  a  va 2 s.  c o  m*/
}

Related

  1. left(String str, int size)
  2. left(String string, int length)
  3. left(String text, int len)
  4. left(String text, int max)
  5. left(String value, int length)