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:
James Roper 2013-09-24 12:17:46 +10:00 committed by Mark Harrah
parent b7770bc52e
commit 5755689a8c
1 changed files with 3 additions and 1 deletions

View File

@ -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.")