Skip to main content

cases syntax

Import cases syntax

import extras.strings.syntax.cases._

Or

import extras.strings.syntax.all._

Case Change for String

String to PascalCase

"Abc".toPascalCase
// res0: String = "Abc"

"AbcDefGhi".toPascalCase
// res1: String = "AbcDefGhi"

"abcDefGhi".toPascalCase
// res2: String = "AbcDefGhi"

"abc".toPascalCase
// res3: String = "Abc"

"ABC".toPascalCase
// res4: String = "Abc"

"Abc_Def_Ghi".toPascalCase
// res5: String = "AbcDefGhi"

"abc_def_ghi".toPascalCase
// res6: String = "AbcDefGhi"

"abc__def__ghi".toPascalCase
// res7: String = "AbcDefGhi"

"Abc-Def-Ghi".toPascalCase
// res8: String = "AbcDefGhi"

"abc-def-ghi".toPascalCase
// res9: String = "AbcDefGhi"

"abc--def--ghi".toPascalCase
// res10: String = "AbcDefGhi"

"Abc Def Ghi".toPascalCase
// res11: String = "AbcDefGhi"

"abc def ghi".toPascalCase
// res12: String = "AbcDefGhi"

"AbcDef_Ghi_jkl-Mno-pqr Stu vwx".toPascalCase
// res13: String = "AbcDefGhiJklMnoPqrStuVwx"

"AbcDef__Ghi___jkl--Mno---pqr Stu vwx".toPascalCase
// res14: String = "AbcDefGhiJklMnoPqrStuVwx"

String to one PascalCase

"Abc".toOnePascalCase
// res15: String = "Abc"

"AbcDefGhi".toOnePascalCase
// res16: String = "Abcdefghi"

"abcDefGhi".toOnePascalCase
// res17: String = "Abcdefghi"

"abc".toOnePascalCase
// res18: String = "Abc"

"ABC".toOnePascalCase
// res19: String = "Abc"

"Abc_Def_Ghi".toOnePascalCase
// res20: String = "Abc_def_ghi"

"abc_def_ghi".toOnePascalCase
// res21: String = "Abc_def_ghi"

"abc__def__ghi".toOnePascalCase
// res22: String = "Abc__def__ghi"

"Abc-Def-Ghi".toOnePascalCase
// res23: String = "Abc-def-ghi"

"abc-def-ghi".toOnePascalCase
// res24: String = "Abc-def-ghi"

"abc--def--ghi".toOnePascalCase
// res25: String = "Abc--def--ghi"

"Abc Def Ghi".toOnePascalCase
// res26: String = "Abc def ghi"

"abc def ghi".toOnePascalCase
// res27: String = "Abc def ghi"

"AbcDef_Ghi_jkl-Mno-pqr Stu vwx".toOnePascalCase
// res28: String = "Abcdef_ghi_jkl-mno-pqr stu vwx"

"AbcDef__Ghi___jkl--Mno---pqr Stu vwx".toOnePascalCase
// res29: String = "Abcdef__ghi___jkl--mno---pqr stu vwx"

String to camelCase

"Abc".toCamelCase
// res30: String = "abc"

"AbcDefGhi".toCamelCase
// res31: String = "abcDefGhi"

"abcDefGhi".toCamelCase
// res32: String = "abcDefGhi"

"abc".toCamelCase
// res33: String = "abc"

"ABC".toCamelCase
// res34: String = "abc"

"Abc_Def_Ghi".toCamelCase
// res35: String = "abcDefGhi"

"abc_def_ghi".toCamelCase
// res36: String = "abcDefGhi"

"abc__def__ghi".toCamelCase
// res37: String = "abcDefGhi"

"Abc-Def-Ghi".toCamelCase
// res38: String = "abcDefGhi"

"abc-def-ghi".toCamelCase
// res39: String = "abcDefGhi"

"abc--def--ghi".toCamelCase
// res40: String = "abcDefGhi"

"Abc Def Ghi".toCamelCase
// res41: String = "abcDefGhi"

"abc def ghi".toCamelCase
// res42: String = "abcDefGhi"

"AbcDef_Ghi_jkl-Mno-pqr Stu vwx".toCamelCase
// res43: String = "abcDefGhiJklMnoPqrStuVwx"

"AbcDef__Ghi___jkl--Mno---pqr Stu vwx".toCamelCase
// res44: String = "abcDefGhiJklMnoPqrStuVwx"

String to Snake_Case

"Abc".toSnakeCase
// res45: String = "Abc"

"AbcDefGhi".toSnakeCase
// res46: String = "Abc_Def_Ghi"

"abcDefGhi".toSnakeCase
// res47: String = "abc_Def_Ghi"

"abc".toSnakeCase
// res48: String = "abc"

"ABC".toSnakeCase
// res49: String = "ABC"

"Abc_Def_Ghi".toSnakeCase
// res50: String = "Abc_Def_Ghi"

"abc_def_ghi".toSnakeCase
// res51: String = "abc_def_ghi"

"ABC_DEF_GHI".toSnakeCase
// res52: String = "ABC_DEF_GHI"

"abc-def-ghi".toSnakeCase
// res53: String = "abc_def_ghi"

"Abc-Def-Ghi".toSnakeCase
// res54: String = "Abc_Def_Ghi"

"ABC-DEF-GHI".toSnakeCase
// res55: String = "ABC_DEF_GHI"

"abc def ghi".toSnakeCase
// res56: String = "abc_def_ghi"

"Abc Def Ghi".toSnakeCase
// res57: String = "Abc_Def_Ghi"

"ABC DEF GHI".toSnakeCase
// res58: String = "ABC_DEF_GHI"

String to SNAKE_UPPER_CASE

"Abc".toSnakeUpperCase
// res59: String = "ABC"

"AbcDefGhi".toSnakeUpperCase
// res60: String = "ABC_DEF_GHI"

"abcDefGhi".toSnakeUpperCase
// res61: String = "ABC_DEF_GHI"

"abc".toSnakeUpperCase
// res62: String = "ABC"

"ABC".toSnakeUpperCase
// res63: String = "ABC"

"Abc_Def_Ghi".toSnakeUpperCase
// res64: String = "ABC_DEF_GHI"

"abc_def_ghi".toSnakeUpperCase
// res65: String = "ABC_DEF_GHI"

"ABC_DEF_GHI".toSnakeUpperCase
// res66: String = "ABC_DEF_GHI"

"abc-def-ghi".toSnakeUpperCase
// res67: String = "ABC_DEF_GHI"

"Abc-Def-Ghi".toSnakeUpperCase
// res68: String = "ABC_DEF_GHI"

"ABC-DEF-GHI".toSnakeUpperCase
// res69: String = "ABC_DEF_GHI"

"abc def ghi".toSnakeUpperCase
// res70: String = "ABC_DEF_GHI"

"Abc Def Ghi".toSnakeUpperCase
// res71: String = "ABC_DEF_GHI"

"ABC DEF GHI".toSnakeUpperCase
// res72: String = "ABC_DEF_GHI"

String to snake_lower_case

"Abc".toSnakeLowerCase
// res73: String = "abc"

"AbcDefGhi".toSnakeLowerCase
// res74: String = "abc_def_ghi"

"abcDefGhi".toSnakeLowerCase
// res75: String = "abc_def_ghi"

"abc".toSnakeLowerCase
// res76: String = "abc"

"ABC".toSnakeLowerCase
// res77: String = "abc"

"Abc_Def_Ghi".toSnakeLowerCase
// res78: String = "abc_def_ghi"

"abc_def_ghi".toSnakeLowerCase
// res79: String = "abc_def_ghi"

"ABC_DEF_GHI".toSnakeLowerCase
// res80: String = "abc_def_ghi"

"abc-def-ghi".toSnakeLowerCase
// res81: String = "abc_def_ghi"

"Abc-Def-Ghi".toSnakeLowerCase
// res82: String = "abc_def_ghi"

"ABC-DEF-GHI".toSnakeLowerCase
// res83: String = "abc_def_ghi"

"abc def ghi".toSnakeLowerCase
// res84: String = "abc_def_ghi"

"Abc Def Ghi".toSnakeLowerCase
// res85: String = "abc_def_ghi"

"ABC DEF GHI".toSnakeLowerCase
// res86: String = "abc_def_ghi"

String to Kebab-Case

"Abc".toKebabCase
// res87: String = "Abc"

"AbcDefGhi".toKebabCase
// res88: String = "Abc-Def-Ghi"

"abcDefGhi".toKebabCase
// res89: String = "abc-Def-Ghi"

"abc".toKebabCase
// res90: String = "abc"

"ABC".toKebabCase
// res91: String = "ABC"

"Abc_Def_Ghi".toKebabCase
// res92: String = "Abc-Def-Ghi"

"abc_def_ghi".toKebabCase
// res93: String = "abc-def-ghi"

"ABC_DEF_GHI".toKebabCase
// res94: String = "ABC-DEF-GHI"

"abc-def-ghi".toKebabCase
// res95: String = "abc-def-ghi"

"Abc-Def-Ghi".toKebabCase
// res96: String = "Abc-Def-Ghi"

"ABC-DEF-GHI".toKebabCase
// res97: String = "ABC-DEF-GHI"

"abc def ghi".toKebabCase
// res98: String = "abc-def-ghi"

"Abc Def Ghi".toKebabCase
// res99: String = "Abc-Def-Ghi"

"ABC DEF GHI".toKebabCase
// res100: String = "ABC-DEF-GHI"

String to KEBAB-UPPER-CASE

"Abc".toKebabUpperCase
// res101: String = "ABC"

"AbcDefGhi".toKebabUpperCase
// res102: String = "ABC-DEF-GHI"

"abcDefGhi".toKebabUpperCase
// res103: String = "ABC-DEF-GHI"

"abc".toKebabUpperCase
// res104: String = "ABC"

"ABC".toKebabUpperCase
// res105: String = "ABC"

"Abc_Def_Ghi".toKebabUpperCase
// res106: String = "ABC-DEF-GHI"

"abc_def_ghi".toKebabUpperCase
// res107: String = "ABC-DEF-GHI"

"ABC_DEF_GHI".toKebabUpperCase
// res108: String = "ABC-DEF-GHI"

"abc-def-ghi".toKebabUpperCase
// res109: String = "ABC-DEF-GHI"

"Abc-Def-Ghi".toKebabUpperCase
// res110: String = "ABC-DEF-GHI"

"ABC-DEF-GHI".toKebabUpperCase
// res111: String = "ABC-DEF-GHI"

"abc def ghi".toKebabUpperCase
// res112: String = "ABC-DEF-GHI"

"Abc Def Ghi".toKebabUpperCase
// res113: String = "ABC-DEF-GHI"

"ABC DEF GHI".toKebabUpperCase
// res114: String = "ABC-DEF-GHI"

String to kebab-lower-case

"Abc".toKebabLowerCase
// res115: String = "abc"

"AbcDefGhi".toKebabLowerCase
// res116: String = "abc-def-ghi"

"abcDefGhi".toKebabLowerCase
// res117: String = "abc-def-ghi"

"abc".toKebabLowerCase
// res118: String = "abc"

"ABC".toKebabLowerCase
// res119: String = "abc"

"Abc_Def_Ghi".toKebabLowerCase
// res120: String = "abc-def-ghi"

"abc_def_ghi".toKebabLowerCase
// res121: String = "abc-def-ghi"

"ABC_DEF_GHI".toKebabLowerCase
// res122: String = "abc-def-ghi"

"abc-def-ghi".toKebabLowerCase
// res123: String = "abc-def-ghi"

"Abc-Def-Ghi".toKebabLowerCase
// res124: String = "abc-def-ghi"

"ABC-DEF-GHI".toKebabLowerCase
// res125: String = "abc-def-ghi"

"abc def ghi".toKebabLowerCase
// res126: String = "abc-def-ghi"

"Abc Def Ghi".toKebabLowerCase
// res127: String = "abc-def-ghi"

"ABC DEF GHI".toKebabLowerCase
// res128: String = "abc-def-ghi"

Case Change for Seq[String]

Seq[String] to PascalCaseString

List("Abc", "Def").mkPascalCaseString
// res129: String = "AbcDef"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkPascalCaseString
// res130: String = "AbcDefGhiJklMnoPqr"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkPascalCaseString
// res131: String = "AbcDefGhiJklMnoPqr"

List("abc").mkPascalCaseString
// res132: String = "Abc"

List("ABC").mkPascalCaseString
// res133: String = "Abc"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkPascalCaseString
// res134: String = "AbcDefGhiJklMnoPqr"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkPascalCaseString
// res135: String = "AbcDefGhiJklMnoPqrStU"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkPascalCaseString
// res136: String = "AbcDefGhiJklMnoPqrStU"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkPascalCaseString
// res137: String = "AbcDefGhiJklMnoPqr"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkPascalCaseString
// res138: String = "AbcDefGhiJklMnoPqrStU"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkPascalCaseString
// res139: String = "AbcDefGhiJklMnoPqrStU"

List("Abc Def Ghi", "jkl mno Pqr").mkPascalCaseString
// res140: String = "AbcDefGhiJklMnoPqr"

List("abc def ghi", "jkl mno pqr", "st u").mkPascalCaseString
// res141: String = "AbcDefGhiJklMnoPqrStU"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkPascalCaseString
// res142: String = "AbcDefGhiJklMnoPqrStU"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkPascalCaseString
// res143: String = "StarBirdGlowWaveLeafBookWindSandRainFireSnowMoonHikePlayJumpCalmKindWarmCool"

Seq[String] to camelCaseString

List("Abc", "Def").mkCamelCaseString
// res144: String = "abcDef"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkCamelCaseString
// res145: String = "abcDefGhiJklMnoPqr"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkCamelCaseString
// res146: String = "abcDefGhiJklMnoPqr"

List("abc").mkCamelCaseString
// res147: String = "abc"

List("ABC").mkCamelCaseString
// res148: String = "abc"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkCamelCaseString
// res149: String = "abcDefGhiJklMnoPqr"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkCamelCaseString
// res150: String = "abcDefGhiJklMnoPqrStU"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkCamelCaseString
// res151: String = "abcDefGhiJklMnoPqrStU"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkCamelCaseString
// res152: String = "abcDefGhiJklMnoPqr"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkCamelCaseString
// res153: String = "abcDefGhiJklMnoPqrStU"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkCamelCaseString
// res154: String = "abcDefGhiJklMnoPqrStU"

List("Abc Def Ghi", "jkl mno Pqr").mkCamelCaseString
// res155: String = "abcDefGhiJklMnoPqr"

List("abc def ghi", "jkl mno pqr", "st u").mkCamelCaseString
// res156: String = "abcDefGhiJklMnoPqrStU"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkCamelCaseString
// res157: String = "abcDefGhiJklMnoPqrStU"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkCamelCaseString
// res158: String = "starBirdGlowWaveLeafBookWindSandRainFireSnowMoonHikePlayJumpCalmKindWarmCool"

Seq[String] to Snake_Case_String

List("Abc", "Def").mkSnakeCaseString
// res159: String = "Abc_Def"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkSnakeCaseString
// res160: String = "Abc_Def_Ghi_jkl_Mno_Pqr"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkSnakeCaseString
// res161: String = "abc_Def_Ghi_jkl_Mno_Pqr"

List("abc").mkSnakeCaseString
// res162: String = "abc"

List("ABC").mkSnakeCaseString
// res163: String = "ABC"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkSnakeCaseString
// res164: String = "Abc_Def_Ghi_jkl_mno_Pqr"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkSnakeCaseString
// res165: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkSnakeCaseString
// res166: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkSnakeCaseString
// res167: String = "Abc_Def_Ghi_jkl_mno_Pqr"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkSnakeCaseString
// res168: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkSnakeCaseString
// res169: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List("Abc Def Ghi", "jkl mno Pqr").mkSnakeCaseString
// res170: String = "Abc_Def_Ghi_jkl_mno_Pqr"

List("abc def ghi", "jkl mno pqr", "st u").mkSnakeCaseString
// res171: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkSnakeCaseString
// res172: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkSnakeCaseString
// res173: String = "star_Bird_Glow_Wave_Leaf_Book_Wind_Sand_Rain_Fire_Snow_Moon_Hike_Play_Jump_Calm_Kind_Warm_Cool"

Seq[String] to SNAKE_UPPER_CASE_STRING

List("Abc", "Def").mkSnakeUpperCaseString
// res174: String = "ABC_DEF"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkSnakeUpperCaseString
// res175: String = "ABC_DEF_GHI_JKL_MNO_PQR"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkSnakeUpperCaseString
// res176: String = "ABC_DEF_GHI_JKL_MNO_PQR"

List("abc").mkSnakeUpperCaseString
// res177: String = "ABC"

List("ABC").mkSnakeUpperCaseString
// res178: String = "ABC"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkSnakeUpperCaseString
// res179: String = "ABC_DEF_GHI_JKL_MNO_PQR"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkSnakeUpperCaseString
// res180: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkSnakeUpperCaseString
// res181: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkSnakeUpperCaseString
// res182: String = "ABC_DEF_GHI_JKL_MNO_PQR"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkSnakeUpperCaseString
// res183: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkSnakeUpperCaseString
// res184: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List("Abc Def Ghi", "jkl mno Pqr").mkSnakeUpperCaseString
// res185: String = "ABC_DEF_GHI_JKL_MNO_PQR"

List("abc def ghi", "jkl mno pqr", "st u").mkSnakeUpperCaseString
// res186: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkSnakeUpperCaseString
// res187: String = "ABC_DEF_GHI_JKL_MNO_PQR_ST_U"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkSnakeUpperCaseString
// res188: String = "STAR_BIRD_GLOW_WAVE_LEAF_BOOK_WIND_SAND_RAIN_FIRE_SNOW_MOON_HIKE_PLAY_JUMP_CALM_KIND_WARM_COOL"

Seq[String] to snake_lower_case_string

List("Abc", "Def").mkSnakeLowerCaseString
// res189: String = "abc_def"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkSnakeLowerCaseString
// res190: String = "abc_def_ghi_jkl_mno_pqr"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkSnakeLowerCaseString
// res191: String = "abc_def_ghi_jkl_mno_pqr"

List("abc").mkSnakeLowerCaseString
// res192: String = "abc"

List("ABC").mkSnakeLowerCaseString
// res193: String = "abc"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkSnakeLowerCaseString
// res194: String = "abc_def_ghi_jkl_mno_pqr"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkSnakeLowerCaseString
// res195: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkSnakeLowerCaseString
// res196: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkSnakeLowerCaseString
// res197: String = "abc_def_ghi_jkl_mno_pqr"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkSnakeLowerCaseString
// res198: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkSnakeLowerCaseString
// res199: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("Abc Def Ghi", "jkl mno Pqr").mkSnakeLowerCaseString
// res200: String = "abc_def_ghi_jkl_mno_pqr"

List("abc def ghi", "jkl mno pqr", "st u").mkSnakeLowerCaseString
// res201: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkSnakeLowerCaseString
// res202: String = "abc_def_ghi_jkl_mno_pqr_st_u"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkSnakeLowerCaseString
// res203: String = "star_bird_glow_wave_leaf_book_wind_sand_rain_fire_snow_moon_hike_play_jump_calm_kind_warm_cool"

Seq[String] to Kebab-Case-String

List("Abc", "Def").mkKebabCaseString
// res204: String = "Abc-Def"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkKebabCaseString
// res205: String = "Abc-Def-Ghi-jkl-Mno-Pqr"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkKebabCaseString
// res206: String = "abc-Def-Ghi-jkl-Mno-Pqr"

List("abc").mkKebabCaseString
// res207: String = "abc"

List("ABC").mkKebabCaseString
// res208: String = "ABC"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkKebabCaseString
// res209: String = "Abc-Def-Ghi-jkl-mno-Pqr"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkKebabCaseString
// res210: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkKebabCaseString
// res211: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkKebabCaseString
// res212: String = "Abc-Def-Ghi-jkl-mno-Pqr"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkKebabCaseString
// res213: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkKebabCaseString
// res214: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List("Abc Def Ghi", "jkl mno Pqr").mkKebabCaseString
// res215: String = "Abc-Def-Ghi-jkl-mno-Pqr"

List("abc def ghi", "jkl mno pqr", "st u").mkKebabCaseString
// res216: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkKebabCaseString
// res217: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkKebabCaseString
// res218: String = "star-Bird-Glow-Wave-Leaf-Book-Wind-Sand-Rain-Fire-Snow-Moon-Hike-Play-Jump-Calm-Kind-Warm-Cool"

Seq[String] to KEBAB-UPPER-CASE-STRING

List("Abc", "Def").mkKebabUpperCaseString
// res219: String = "ABC-DEF"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkKebabUpperCaseString
// res220: String = "ABC-DEF-GHI-JKL-MNO-PQR"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkKebabUpperCaseString
// res221: String = "ABC-DEF-GHI-JKL-MNO-PQR"

List("abc").mkKebabUpperCaseString
// res222: String = "ABC"

List("ABC").mkKebabUpperCaseString
// res223: String = "ABC"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkKebabUpperCaseString
// res224: String = "ABC-DEF-GHI-JKL-MNO-PQR"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkKebabUpperCaseString
// res225: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkKebabUpperCaseString
// res226: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkKebabUpperCaseString
// res227: String = "ABC-DEF-GHI-JKL-MNO-PQR"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkKebabUpperCaseString
// res228: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkKebabUpperCaseString
// res229: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List("Abc Def Ghi", "jkl mno Pqr").mkKebabUpperCaseString
// res230: String = "ABC-DEF-GHI-JKL-MNO-PQR"

List("abc def ghi", "jkl mno pqr", "st u").mkKebabUpperCaseString
// res231: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkKebabUpperCaseString
// res232: String = "ABC-DEF-GHI-JKL-MNO-PQR-ST-U"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkKebabUpperCaseString
// res233: String = "STAR-BIRD-GLOW-WAVE-LEAF-BOOK-WIND-SAND-RAIN-FIRE-SNOW-MOON-HIKE-PLAY-JUMP-CALM-KIND-WARM-COOL"

Seq[String] to kebab-lower-case-string

List("Abc", "Def").mkKebabLowerCaseString
// res234: String = "abc-def"

List("AbcDef", "Ghi", "jkl", "MnoPqr").mkKebabLowerCaseString
// res235: String = "abc-def-ghi-jkl-mno-pqr"

List("abcDef", "Ghi", "jkl", "MnoPqr").mkKebabLowerCaseString
// res236: String = "abc-def-ghi-jkl-mno-pqr"

List("abc").mkKebabLowerCaseString
// res237: String = "abc"

List("ABC").mkKebabLowerCaseString
// res238: String = "abc"

List("Abc_Def_Ghi", "jkl_mno_Pqr").mkKebabLowerCaseString
// res239: String = "abc-def-ghi-jkl-mno-pqr"

List("abc_def_ghi", "jkl_mno_pqr", "st_u").mkKebabLowerCaseString
// res240: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("ABC_DEF_GHI", "JKL_MNO_PQR", "ST_U").mkKebabLowerCaseString
// res241: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("Abc-Def-Ghi", "jkl-mno-Pqr").mkKebabLowerCaseString
// res242: String = "abc-def-ghi-jkl-mno-pqr"

List("abc-def-ghi", "jkl-mno-pqr", "st-u").mkKebabLowerCaseString
// res243: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("ABC-DEF-GHI", "JKL-MNO-PQR", "ST-U").mkKebabLowerCaseString
// res244: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("Abc Def Ghi", "jkl mno Pqr").mkKebabLowerCaseString
// res245: String = "abc-def-ghi-jkl-mno-pqr"

List("abc def ghi", "jkl mno pqr", "st u").mkKebabLowerCaseString
// res246: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List("ABC DEF GHI", "JKL MNO PQR", "ST U").mkKebabLowerCaseString
// res247: String = "abc-def-ghi-jkl-mno-pqr-st-u"

List(
"starBirdGlow Wave_Leaf-Book Wind-Sand_Rain Fire",
"Snow-Moon Hike__Play--Jump Calm--__Kind Warm __-- Cool"
).mkKebabLowerCaseString
// res248: String = "star-bird-glow-wave-leaf-book-wind-sand-rain-fire-snow-moon-hike-play-jump-calm-kind-warm-cool"

Split String by PascalCase or cacmelCase

You can split a String value by PascalCase or camelCase.

e.g.)

"StarBirdGlowWaveLeafBookWindSandRainFireSnowMoonHikePlayJumpCalmKindWarmSoftCool".splitByCase
// res249: Vector[String] = Vector(
// "Star",
// "Bird",
// "Glow",
// "Wave",
// "Leaf",
// "Book",
// "Wind",
// "Sand",
// "Rain",
// "Fire",
// "Snow",
// "Moon",
// "Hike",
// "Play",
// "Jump",
// "Calm",
// "Kind",
// "Warm",
// "Soft",
// "Cool"
// )
"starBirdGlowWaveLeafBookWindSandRainFireSnowMoonHikePlayJumpCalmKindWarmSoftCool".splitByCase
// res250: Vector[String] = Vector(
// "star",
// "Bird",
// "Glow",
// "Wave",
// "Leaf",
// "Book",
// "Wind",
// "Sand",
// "Rain",
// "Fire",
// "Snow",
// "Moon",
// "Hike",
// "Play",
// "Jump",
// "Calm",
// "Kind",
// "Warm",
// "Soft",
// "Cool"
// )