Here you can find the source of endsWithWord(StringBuffer strBuf, int endIndex, int lastSpaceIndex)
Parameter | Description |
---|---|
strBuf | a parameter |
endIndex | a parameter |
lastSpaceIndex | a parameter |
private static boolean endsWithWord(StringBuffer strBuf, int endIndex, int lastSpaceIndex)
//package com.java2s; public class Main { /**/*from w ww.j av a2 s .c o m*/ * This method checks for the end Index value and returns true if it * matches. * * @param strBuf * @param endIndex * @param lastSpaceIndex * @return boolean */ private static boolean endsWithWord(StringBuffer strBuf, int endIndex, int lastSpaceIndex) { return ((lastSpaceIndex == (endIndex - 1)) || (strBuf.charAt(endIndex) == ' ')); } }