public class Solution { public String LeftRotateString(String str,int n) { if (str == null || str.length() < 1) { return ""; } String pre = str.substring(0, n); String post = str.substring(n); return post + pre; } }