Forum Discussion
Hi,
Not sure, what you are asking.
aqString.Compare("Energiezähler", "ENERGIEZÄHLER", false)
above line will return 0 if both values matched.
From TC docuement:
Result Value
Integer value that indicates the comparison result. The following values are possible:
Value | Meaning |
---|---|
-1 | The String1 is less than String2. |
0 | The String1 identical to String2. |
1 | The String1 is greater than String2. |
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/compare.html
- Manfred_F8 years agoRegular Contributor
To be more precise, I get the Result 1, not 0.
When I remove the "Ä"/ "ä", there is the 0, as expected.
- tristaanogre8 years agoEsteemed Contributor
I have the following code (in JScript):
function test3() { Log.Message(aqString.Compare('Energiezähler','ENERGIEZÄHLER', false)); }
And this is returning a 0 as expected. I'm running TC 12.30. I don't have 11.2 installed to verify. It's possible that better support for extended ASCII within the aqString object may be included in later versions. I'd suggest you send this query off to the support team directly.
- shankar_r8 years agoCommunity Hero
I just copy pasted the aqString.Compare("Energiezähler", "ENERGIEZÄHLER", false) into my TestComplete, it is giving 0
- AlexKaras8 years agoChampion Level 3
Hm-m-m...
I thought that it might to have something related to the current locale... but...
TC11.31 with non-German locale and VBScript project:
iStatusId = aqString.Compare("Energiezähler", "ENERGIEZÄHLER", False)
returned zero.
Related Content
- 8 years ago
- 6 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 7 days ago