str := "\"RECT\""
fmt.Println(str)
// Get rune slice.
// ... Modify the slice's data.
ch := []rune(str)
ch[0] = 'y'
ch = append(ch, 'e')
// Create new string from modified slice.
result := string(ch)
fmt.Println(result)
str := "\"RECT\""
fmt.Println(str)
// Get rune slice.
// ... Modify the slice's data.
ch := []rune(str)
ch[0] = 'y'
ch = append(ch, 'e')
// Create new string from modified slice.
result := string(ch)
fmt.Println(result)
Комментариев нет:
Отправить комментарий