folding.go 439 B

12345678910111213141516171819
  1. // Copyright (C) 2017 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. package fs
  7. import (
  8. "unicode"
  9. )
  10. func UnicodeLowercase(s string) string {
  11. rs := []rune(s)
  12. for i, r := range rs {
  13. rs[i] = unicode.ToLower(unicode.ToUpper(r))
  14. }
  15. return string(rs)
  16. }