mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Fix compiling messages.
This commit is contained in:
parent
2e58afa75c
commit
c6f9c88d2a
3 changed files with 8 additions and 7 deletions
|
@ -2,9 +2,10 @@ package com.beust.kobalt.misc
|
|||
|
||||
import com.google.common.base.CharMatcher
|
||||
|
||||
public class Strings {
|
||||
class Strings {
|
||||
companion object {
|
||||
fun pluralize(s: String, n: Int) = s + (if (n != 1) "s" else "")
|
||||
fun pluralizeAll(s: String, n: Int) = "$n " + pluralize(s, n)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,6 +13,6 @@ public class Strings {
|
|||
/**
|
||||
* @Return the number of times the given character occurs in the string
|
||||
*/
|
||||
public infix fun String.countChar(c: Char) : Int {
|
||||
infix fun String.countChar(c: Char) : Int {
|
||||
return CharMatcher.`is`(c).countIn(this)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue