25 Ocak 2011 Salı

Google Go programlama dili ile Türkçe küçük harf büyük harf dönüşümü

Google Go programlama dili ile Türkçe küçük harf büyük harf dönüşümüne basit bir örnek.

package main

import ("fmt"
 "strings"
 "unicode" 
 )

func main() {
  lower := "abcçdefgğhıijklmnoöprsştuüvyz"
  upper := "ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ"
 fmt.Println(strings.ToLowerSpecial(unicode.TurkishCase, upper))
 fmt.Println(strings.ToUpperSpecial(unicode.TurkishCase, lower))
}

Hiç yorum yok:

Yorum Gönder