Java String Pluralize pluralise(String str)

Here you can find the source of pluralise(String str)

Description

Returns a pluralised version of the given String

License

GNU General Public License

Parameter

Parameter Description
str the String to pluralize

Return

the pluralised version of str

Declaration

public static String pluralise(String str) 

Method Source Code

//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";
    }
}

Related

  1. pluralForm(final String string, final int number)
  2. pluralify(String term, int value)
  3. pluralise(int count, String singular, String plural)
  4. pluralise(int num, String word)
  5. pluralise(String name)
  6. pluralise(String string, double size)
  7. pluraliseInc(int num, String word)
  8. pluraliseNoun(String noun, long count, boolean forceAppendingSByDefault)
  9. pluralize(final int count, final String singular, final String plural)