解决了

改变一个字符串来降低或大写


Userlevel 3
徽章 + 2
  • 社区负责人
  • 16日回复

你好

如何将一个字符串"中的"小写或字符串“中的”大写吗?

谢谢你!

问候,

Vinay

(最初要求和解决支持中心)

图标

最佳答案社区管理员2023年7月7日,第14章22节

Hi,<\/p>

you can use the following expressions for such a use case:<\/p>

\u00a0{CALC[LOWER(\"ABCDE\")]} or {CALC[UPPER(\"abcde\")]}<\/p>

Please beware though that CALC expressions only work in TBox starting with Tosca 9.1 and can only be used in classic TestSteps prior to that version.
\u00a0<\/p>","className":"post__content__best_answer"}">

查看原始

10个回答

Userlevel 3
徽章 + 2

你好,

您可以使用以下表达式对于这样一个用例:

{CALC[低(“中的”)]}或{CALC[上(“中的”)]}

请注意虽然CALC表达式只与托斯卡TBox开始9.1,只能用于经典TestSteps之前的版本。

Userlevel 3
徽章 + 2

当我把这个值{CALC[上(“中的”)]}在托斯卡10中,它给了我1。价值:“-2146826259”

Userlevel 3
徽章 + 2

或者尝试三个报价

Userlevel 3
徽章 + 2

如何将一个值在缓冲区大写或小写吗

Userlevel 3
徽章 + 2

将字符串转换为大写或小写,CALC可以用于Tbox模块托斯卡10。

如果你直接输入字符串,使用双引号的3组{CALC[上(“”“输入”)]}。

但是如果你输入字符串缓冲区,然后用四组双引号的{CALC[上(“”“{B[输入]}" " " ")]}。

Userlevel 3
徽章 + 2

谢谢大家的评论,这帮了我大忙。我需要设置值的日期2个月前的今天,格式如01 - 1月- 2000,下面是最终的解决方案多亏了你的帮助:)

解决方案:{日期[][2 m] [dd - {CALC[上(“”“{AMONTH} " " ")]} yyyy]}

每秒钟有笔记历史点很有用:)

Userlevel 3
徽章 + 2

另一个用户有以下相关问题:

如何使用骆驼在托斯卡套管吗?例如,我想把雷诺雷诺

Userlevel 3
徽章 + 2

使用方法:适当的

{CALC(适当的(“"中的" " ")]}<——这将是“中的”

{CALC(适当的(“”“”{B[标题]}" " "))}

Userlevel 3
徽章 + 2

另一个用户的问题:

我试过四个引号Q50573243040722963612缓冲值

{CALC (LEF (“”“”{B [Barcode_ {B [CounterBarCode]}]}”“”“”“”““18”)]}

但得到不正确的结果为“-2146826259”。结果应该返回Q50573243040722963。

请给我发展什么是错误的。

Userlevel 3
徽章 + 2

看下面的附件,不需要使用钙

回复


Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu
map