implicit final class InflectorOps extends AnyVal
Extension methods for inflection (singular/plural) and naming case convention transformations.
- Source
- string.scala
- Alphabetic
- By Inheritance
- InflectorOps
- AnyVal
- Any
- by AnyOps
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new InflectorOps(value: String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from InflectorOps to any2stringadd[InflectorOps] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (InflectorOps, B)
- Implicit
- This member is added by an implicit conversion from InflectorOps to ArrowAssoc[InflectorOps] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
ensuring(cond: (InflectorOps) ⇒ Boolean, msg: ⇒ Any): InflectorOps
- Implicit
- This member is added by an implicit conversion from InflectorOps to Ensuring[InflectorOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (InflectorOps) ⇒ Boolean): InflectorOps
- Implicit
- This member is added by an implicit conversion from InflectorOps to Ensuring[InflectorOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): InflectorOps
- Implicit
- This member is added by an implicit conversion from InflectorOps to Ensuring[InflectorOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): InflectorOps
- Implicit
- This member is added by an implicit conversion from InflectorOps to Ensuring[InflectorOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from InflectorOps to StringFormat[InflectorOps] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
def
future: Future[InflectorOps]
Creates an already completed
Future
containingvalue
.Creates an already completed
Future
containingvalue
.- returns
the already completed
Future
with the specified result
- Implicit
- This member is added by an implicit conversion from InflectorOps to AnyOps[InflectorOps] performed by method AnyOps in scail.commons.ops.
- Definition Classes
- AnyOps
- Annotations
- @inline()
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
humanize(removableTokens: String*): String
Capitalizes the first word and turns underscores into spaces and strips trailing "_id" and any supplied removable tokens.
Capitalizes the first word and turns underscores into spaces and strips trailing "_id" and any supplied removable tokens.
- removableTokens
optional array of tokens that are to be removed
- returns
the humanized string
- Annotations
- @inline()
-
def
humanize: String
Capitalizes the first word and turns underscores into spaces and strips trailing "_id" and any supplied removable tokens.
Capitalizes the first word and turns underscores into spaces and strips trailing "_id" and any supplied removable tokens.
- returns
the humanized string
- Annotations
- @inline()
-
def
humanizeTitle(removableTokens: String*): String
Capitalizes all the words and replaces some characters in the string to create a nicer looking title.
Capitalizes all the words and replaces some characters in the string to create a nicer looking title. Underscores are changed to spaces, a trailing "_id" is removed, and any of the supplied tokens are removed.
- removableTokens
optional array of tokens that are to be removed
- returns
the title-case version of the supplied string
- Annotations
- @inline()
-
def
humanizeTitle: String
Capitalizes all the words and replaces some characters in the string to create a nicer looking title.
Capitalizes all the words and replaces some characters in the string to create a nicer looking title. Underscores are changed to spaces, a trailing "_id" is removed, and any of the supplied tokens are removed.
- returns
the title-case version of the supplied string
- Annotations
- @inline()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lowerCamelCase(delimiterChars: String): String
Converts strings to lowerCamelCase.
Converts strings to lowerCamelCase. This method will also use any extra delimiter characters to identify word boundaries.
- delimiterChars
optional characters that are used to delimit word boundaries
- returns
the lower camel case version of the word
- Annotations
- @inline()
-
def
lowerCamelCase: String
Converts strings to lowerCamelCase.
Converts strings to lowerCamelCase.
- returns
the lower camel case version of the word
- Annotations
- @inline()
-
def
option: Option[InflectorOps]
Creates an
Option
containingvalue
.Creates an
Option
containingvalue
.- returns
Some(value)
ifvalue
is notnull
,None
otherwise
- Implicit
- This member is added by an implicit conversion from InflectorOps to AnyOps[InflectorOps] performed by method AnyOps in scail.commons.ops.
- Definition Classes
- AnyOps
- Annotations
- @inline()
-
def
pluralize(count: Int): String
Returns the plural form of the word.
Returns the plural form of the word.
- count
the number to pluralize to
- returns
the pluralized form of the word, or the word itself if it could not be pluralized or if
count
was either 1 or -1
- Annotations
- @inline()
-
def
pluralize: String
Returns the plural form of the word.
Returns the plural form of the word.
- returns
the pluralized form of the word
- Annotations
- @inline()
-
def
sentenceCase: String
Returns a copy of the input with the first character converted to uppercase and the remainder to lowercase.
Returns a copy of the input with the first character converted to uppercase and the remainder to lowercase.
- returns
the word with the first character capitalized and the remaining characters lowercased
- Annotations
- @inline()
-
def
singularize: String
Returns the singular form of the word.
Returns the singular form of the word.
- returns
the singularized form of the word, or the word itself if it could not be singularized
- Annotations
- @inline()
-
def
tap(f: (InflectorOps) ⇒ Unit): InflectorOps
Applies side-effectul method to
value
, returningvalue
.Applies side-effectul method to
value
, returningvalue
.- f
the side-effectful method to apply to
value
- returns
value
- Implicit
- This member is added by an implicit conversion from InflectorOps to AnyOps[InflectorOps] performed by method AnyOps in scail.commons.ops.
- Definition Classes
- AnyOps
-
def
toString(): String
- Definition Classes
- Any
-
def
underscore(delimiterChars: String): String
Makes an underscored form from the expression in the string, the reverse of the camelCase method.
Makes an underscored form from the expression in the string, the reverse of the camelCase method. Also changes any characters that match the supplied delimiters into underscore.
- delimiterChars
optional characters that are used to delimit word boundaries
- returns
the lower-cased version of the input with words delimited by the underscore character
- Annotations
- @inline()
-
def
underscore: String
Makes an underscored form from the expression in the string, the reverse of the camelCase method.
Makes an underscored form from the expression in the string, the reverse of the camelCase method.
- returns
the lower-cased version of the input with words delimited by the underscore character
- Annotations
- @inline()
-
def
upperCamelCase(delimiterChars: String): String
Converts strings to UpperCamelCase.
Converts strings to UpperCamelCase. This method will also use any extra delimiter characters to identify word boundaries.
- delimiterChars
optional characters that are used to delimit word boundaries
- returns
the upper camel case version of the word
- Annotations
- @inline()
-
def
upperCamelCase: String
Converts strings to UpperCamelCase.
Converts strings to UpperCamelCase.
- returns
the upper camel case version of the word
- Annotations
- @inline()
-
def
→[B](y: B): (InflectorOps, B)
- Implicit
- This member is added by an implicit conversion from InflectorOps to ArrowAssoc[InflectorOps] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc