Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed May 26, 2017
1 parent e06bab3 commit a51d952
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/team/src/main/Team.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ object Team {

case class IdsStr(value: String) extends AnyVal {

def contains(teamId: ID) = value contains teamId
def contains(teamId: ID) =
value.startsWith(teamId) ||
value.endsWith(teamId) ||
value.contains(s"${IdsStr.separator}$teamId${IdsStr.separator}")

def toArray: Array[String] = value.split(IdsStr.separator)
def toList = if (value.isEmpty) Nil else toArray.toList
Expand Down

0 comments on commit a51d952

Please sign in to comment.