mirror of https://github.com/sbt/sbt.git
String upper/lower case no longer locale dependent
Fixed many instances of the Turkish i bug. Spare a thought for the poor Turks!
This commit is contained in:
parent
b7770bc52e
commit
5755689a8c
|
|
@ -3,10 +3,12 @@
|
|||
*/
|
||||
package sbt
|
||||
|
||||
import java.util.Locale
|
||||
|
||||
object StringUtilities
|
||||
{
|
||||
@deprecated("Different use cases require different normalization. Use Project.normalizeModuleID or normalizeProjectID instead.", "0.13.0")
|
||||
def normalize(s: String) = s.toLowerCase.replaceAll("""\W+""", "-")
|
||||
def normalize(s: String) = s.toLowerCase(Locale.ENGLISH).replaceAll("""\W+""", "-")
|
||||
def nonEmpty(s: String, label: String)
|
||||
{
|
||||
require(s.trim.length > 0, label + " cannot be empty.")
|
||||
|
|
|
|||
Loading…
Reference in New Issue