Java String Last Index Of lastIndexOfWhitespace(String s)

Here you can find the source of lastIndexOfWhitespace(String s)

Description

last Index Of Whitespace

License

Open Source License

Declaration

public static final int lastIndexOfWhitespace(String s) 

Method Source Code

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

public class Main {
    public static final int lastIndexOfWhitespace(String s) {
        for (int i = s.length() - 1; i >= 0; i--)
            if (s.charAt(i) <= ' ')
                return i;
        return -1;
    }//  www. jav  a  2s  . c om
}

Related

  1. lastIndexOfOrdinal(String value, String part, int startIndex, int count, boolean caseSensitive)
  2. lastIndexOfPathSeparator(String str)
  3. lastIndexOfSeparator(String path)
  4. lastIndexOfUCL(String value)
  5. lastIndexOfUnnested(String str, char chr, String openBalance, String closeBalance)