Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (13 sloc) 335 Bytes
/* sbt -- Simple Build Tool
* Copyright 2009 Mark Harrah
*/
package sbt
object StringUtilities
{
def normalize(s: String) = s.toLowerCase.replaceAll("""\s+""", "-")
def nonEmpty(s: String, label: String)
{
require(s.trim.length > 0, label + " cannot be empty.")
}
def appendable(s: String) = if(s.isEmpty) "" else "_" + s
}
Jump to Line
Something went wrong with that request. Please try again.