Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Charstring comparison

Charstring comparison 08 Jul 2014 11:22 #7840

  • Dominik
  • Dominik's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Does TTCN-3 require any embedded function for string comparison?

I know == operatior and match(expression,template) function. I did not find what is the result of comparing two charstrings using == or match(expression,template). Do they work properly for charstrings? I am worry of something like that: comparison returns true if both charstrings contain anything or both contain nothing.

If there are no embedded functions, then I write my own. But I want to be sure if there is no dedicated mechanism.
The administrator has disabled public write access.

Charstring comparison 08 Jul 2014 12:37 #7841

Hi Dominik,

Two charstrings are equal only if they are strictly the same: have equal length and equal characters in the same order. Equality and match will return the same result in the particular case, when the template contains a specific value. An empty string ("") equals to an empty string only.

See further details in clause 7.1.3 of part-1 (www.ttcn-3.org/index.php/downloads/standards).
Last Edit: 08 Jul 2014 13:31 by György Réthy.
The administrator has disabled public write access.

Charstring comparison 09 Jul 2014 11:07 #7843

  • Dominik
  • Dominik's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi György,

thank you for your answer! You have solved my doubts about this problem.
The administrator has disabled public write access.

Charstring comparison 09 Jul 2014 11:28 #7844

:-).

You are welcome!
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin