Here you can find the source of left(String s, int l)
public static final String left(String s, int l)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w . java 2 s . c om*/ * left returns the left most characters of a string */ public static final String left(String s, int l) { try { return s.substring(0, l); } catch (StringIndexOutOfBoundsException e) { return s; } } }