code: public String trimLeading(String str) {
          if (str == null) {
              return null;
          }
  
          int length = str.length();
          for (int i=0; i<length; i++) {
              if (str.charAt(i) > ' ') {
                  return str.substring(i);
              }
          }
  
          return "";
      }
docs: Trims all leading whitespace characters from the given string.
  
  @param str the string to trim
  
  @return the trimmed string