Here you can find the source of startsWith(StringBuffer buffer, String prefix)
Parameter | Description |
---|---|
buffer | a parameter |
prefix | a parameter |
public static boolean startsWith(StringBuffer buffer, String prefix)
//package com.java2s; /* Copyright 2011 Alexander Bunkenburg alex@inspiracio.com // www . jav a 2 s. c o m This file is part of atom.jar. atom.jar is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. atom.jar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with atom.jar. If not, see <http://www.gnu.org/licenses/>. */ public class Main { /** Does the buffer start with prefix? * @param buffer * @param prefix * @return boolean */ public static boolean startsWith(StringBuffer buffer, String prefix) { boolean startsWith = buffer.indexOf(prefix) == 0; return startsWith; } }