gitee.com/quant1x/gox@v1.21.2/api/string_kebab.go (about)

     1  // Copyright (c) 2017, A. Stoewer <adrian.stoewer@rz.ifi.lmu.de>
     2  // All rights reserved.
     3  
     4  package api
     5  
     6  // KebabCase converts a string into kebab case.
     7  func KebabCase(s string) string {
     8  	return delimiterCase(s, '-', false)
     9  }
    10  
    11  // UpperKebabCase converts a string into kebab case with capital letters.
    12  func UpperKebabCase(s string) string {
    13  	return delimiterCase(s, '-', true)
    14  }