mirror of https://github.com/tinygo-org/tinygo.git
wasmstm32webassemblymicrocontrollerarmavrspiwasiadafruitarduinocircuitplayground-expressgpioi2cllvmmicrobitnrf51nrf52nrf52840samd21tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
419 B
24 lines
419 B
package main
|
|
|
|
func testRangeString() {
|
|
for i, c := range "abcü¢€𐍈°x" {
|
|
println(i, c)
|
|
}
|
|
}
|
|
|
|
func testStringToRunes() {
|
|
var s = "abcü¢€𐍈°x"
|
|
for i, c := range []rune(s) {
|
|
println(i, c)
|
|
}
|
|
}
|
|
|
|
func testRunesToString(r []rune) {
|
|
println("string from runes:", string(r))
|
|
}
|
|
|
|
func main() {
|
|
testRangeString()
|
|
testStringToRunes()
|
|
testRunesToString([]rune{97, 98, 99, 252, 162, 8364, 66376, 176, 120})
|
|
}
|
|
|