Eggplant/Sensetalk 解析并分隔带有大写单词的字符串
我需要能够使用 Sensetalk(Eggplant GUI 测试器使用的脚本语言)解析和分离文本字符串。我想要做的是为代码提供一个文本字符串:
Put "MyTextIsHere" into exampleString
然后在每个大写字母之前插入空格(保存第一个),因此以下内容将存储在 exampleString 中:
"My Text Is Here"
我基本上想要将字符串分成它包含的单词。在搜索文档和网络之后,我并没有更接近找到解决方案(我同意,使用不同的语言会容易得多 - 唉,不是我的选择)。
预先感谢任何能够提供一些见解的人!
I'm in need of the ability to parse and separate a text string using Sensetalk (the scripting language the Eggplant GUI tester uses). What I'd like to be able to do is provide the code a text string:
Put "MyTextIsHere" into exampleString
And then have spaces inserted before every capital letter save for the first, so the following is then stored in exampleString:
"My Text Is Here"
I basically want to separate the string into the words it contains. After searching the documentation and the web, I'm no closer to finding a solution to this (I agree, it would be far easier in a different language - alas, not my choice).
Thank you in advance to anyone who can provide some insight!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅问题 http://www.testplant.com/phpBB2/viewtopic.php? t=2192。
感谢 TestPlant 论坛上的 Pamela:
或者您可以这样做:
See question at http://www.testplant.com/phpBB2/viewtopic.php?t=2192.
With credit to Pamela at TestPlant forums:
or you could do it this way: