我在python工作了很长时间,我知道方法lower,现在我工作Godot Game Engine,它使用gdscript(引擎本身的语言),这种语言基于python语言的语法,并从中借鉴了很多.
我需要(str)用小写字母显示变量的内容。我出于习惯打字lower,它给出了一个错误。找了,google了,没找到答案。谁知道解决方法?例子:
print(command.text)
>> RELOAD
print(command.text.method())
>> reload
我在python工作了很长时间,我知道方法lower,现在我工作Godot Game Engine,它使用gdscript(引擎本身的语言),这种语言基于python语言的语法,并从中借鉴了很多.
我需要(str)用小写字母显示变量的内容。我出于习惯打字lower,它给出了一个错误。找了,google了,没找到答案。谁知道解决方法?例子:
print(command.text)
>> RELOAD
print(command.text.method())
>> reload
文档说:
Stringto_lower()Returns the string converted to lowercase.https://docs.godotengine.org/en/stable/classes/class_string.html