Here you can find the source of pluralise(String str)
Parameter | Description |
---|---|
str | the String to pluralize |
public static String pluralise(String str)
//package com.java2s; /*// www .j a v a 2s. c o m * Copyright (C) 2002-2017 FlyMine * * This code may be freely distributed and modified under the * terms of the GNU Lesser General Public Licence. This should * be distributed with the code. See the LICENSE file for more * information or http://www.gnu.org/copyleft/lesser.html. * */ public class Main { /** * Returns a pluralised version of the given String * * @param str the String to pluralize * @return the pluralised version of str */ public static String pluralise(String str) { if (str == null) { return null; } return str + "s"; } }