2022-12-06 02:46:47 +00:00
|
|
|
# https://github.com/godotengine/godot/issues/64171
|
2023-05-15 11:06:43 +00:00
|
|
|
# https://github.com/godotengine/godot/issues/60145
|
|
|
|
|
|
|
|
var s = "abc"
|
|
|
|
var sn = &"abc"
|
2022-12-06 02:46:47 +00:00
|
|
|
|
|
|
|
func test():
|
|
|
|
print("Compare ==: ", "abc" == &"abc")
|
|
|
|
print("Compare ==: ", &"abc" == "abc")
|
|
|
|
print("Compare !=: ", "abc" != &"abc")
|
|
|
|
print("Compare !=: ", &"abc" != "abc")
|
|
|
|
|
|
|
|
print("Concat: ", "abc" + &"def")
|
|
|
|
print("Concat: ", &"abc" + "def")
|
|
|
|
print("Concat: ", &"abc" + &"def")
|
2023-05-15 11:06:43 +00:00
|
|
|
|
|
|
|
match "abc":
|
|
|
|
&"abc":
|
|
|
|
print("String matched StringName literal")
|
|
|
|
_:
|
|
|
|
print("no Match")
|
|
|
|
|
|
|
|
match &"abc":
|
|
|
|
"abc":
|
|
|
|
print("StringName matched String literal")
|
|
|
|
_:
|
|
|
|
print("no Match")
|
|
|
|
|
|
|
|
match "abc":
|
|
|
|
sn:
|
|
|
|
print("String matched StringName")
|
|
|
|
_:
|
|
|
|
print("no match")
|
|
|
|
|
|
|
|
match &"abc":
|
|
|
|
s:
|
|
|
|
print("StringName matched String")
|
|
|
|
_:
|
|
|
|
print("no match")
|