package main

import (
	"fmt"
	"strings"
)

func testStrings() {
	broken := "G# r#cks!"
	replacer := strings.NewReplacer("#", "o")
	fixed := replacer.Replace(broken)
	fmt.Println(fixed)
}

func testString() {
	v := "Hello"
	for i, c := range v {
		fmt.Printf("%d of '%s\n", i, string(c))
	}

	emoji := []rune("cool")
	for _, ch := range emoji {
		fmt.Printf("%d of '%s'\n", ch, string(ch))
	}
}

func testSlice() {
	
}

func main() {
	testString()
	/*
		var price int = 100.0
		fmt.Println("Price is", price, "dollars.")

		var taxRate float64 = 0.08
		var tax float64 = float64(price) * taxRate
		fmt.Println("Tax is", tax, "dollars")

		var total float64 = float64(price) + tax
		fmt.Println("Total cost is", total, "dollars")

		var aviableFunds int = 120
		fmt.Println(aviableFunds, "dollars available.")
		fmt.Println("Within budget?", total <= float64(aviableFunds))
	*/

	/*
		var now time.Time = time.Now()
		var year int = now.Year()
		fmt.Println("Today is", year, "year")
		fmt.Println("Now is", time.Now())
	*/
	// test_error()
	// testStrings()
}
