Here you can find the source of left(String s, int nCaratteri)
public static String left(String s, int nCaratteri)
//package com.java2s; //License from project: Apache License public class Main { /**/* w ww . j av a 2 s. co m*/ */ public static String left(String s, int nCaratteri) { if (s == null) return null; if (nCaratteri < 1) return ""; if (nCaratteri >= s.length()) return s; return s.substring(0, nCaratteri); } }