如何在rascal中大写字符串?

在字符串库的文档中,我找不到任何方法来大写字符串。

http://tutor.rascal-mpl.org/Rascal/Rascal.html#/Rascal/Expressions/Values/String/String.html

有帮助吗?

解决方案

你应该使用 toUpperCase 功能在 String 图书馆,详情如下:

http://tutor.rascal-mpl.org/Rascal/Rascal.html#/Rascal/Libraries/Prelude/String/toUpperCase/toUpperCase.html

例如:

rascal>import String;
ok

rascal>toUpperCase("hEllO WOrlD");
str: "HELLO WORLD"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top