public static String singularize ( String target ) { // TODO we should add this as an issue in the RamlBase project and // provide a pull request String result = Inflector . singularize ( target ) ; if ( ( target . endsWith ( "ss" ) ) && ( result . equals ( target . substring ( 0 , target . length ( ) - 1 ) ) ) ) { result = target ; } return result ; }
Singularises a string . uses underlying raml parser system