jetbrains.buildServer.configs.kotlin.v10 / kotlin.String / toExtId

toExtId

fun String.toExtId(prefix: String = ""): String

Creates a string satisfying requirements for an external id in TeamCity. Can be used to generate an external id from a name.

"Fast Tests".toExtId() //result: FastTests
"Fast Tests".toExtId("MainProject") //result: MainProject_FastTests

Parameters

prefix - an optional prefix to add to the external id