Convert *Id to any wrapped type. Shorten names for class methods

that return an instance of the class. Fix return types for Go
interfaces.
This commit is contained in:
gmp
2019-05-01 12:34:29 -04:00
parent 57ad898945
commit 11366be6d0
3 changed files with 33 additions and 12 deletions
+8 -4
View File
@@ -8,13 +8,13 @@ import (
)
func main() {
n1 := ns.NSStringStringWithUTF8String(ns.CharFromString("hi there"))
n1 := ns.NSStringWithUTF8String(ns.CharFromString("hi there"))
c1 := n1.CapitalizedString()
gs := c1.UTF8String().String()
fmt.Println(gs)
n2 := ns.NSStringStringWithUTF8String(ns.CharFromString("hi world"))
n3 := ns.NSStringStringWithUTF8String(ns.CharFromString("ok bye"))
a := ns.NSMutableArrayArrayWithObjects(n1,n2,n3)
n2 := ns.NSStringWithUTF8String(ns.CharFromString("hi world"))
n3 := ns.NSStringWithUTF8String(ns.CharFromString("ok bye"))
a := ns.NSMutableArrayWithObjects(n1,n2,n3)
fmt.Println("Length(a) = ",a.Count())
fmt.Println("is n2 in a?",a.ContainsObject(n2))
fmt.Println("is c1 in a?",a.ContainsObject(c1))
@@ -23,4 +23,8 @@ func main() {
a.AddObject(n4)
a.AddObject(n5)
fmt.Println("Length(a) = ",a.Count())
a2 := a.SubarrayWithRange(ns.NSMakeRange(1,3))
fmt.Println("Length(a2) = ",a2.Count())
i1 := a.ObjectAtIndex(1).NSString()
fmt.Println(i1.UTF8String())
}