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

TOPIC:

Charstring comparison 08 Jul 2014 11:22 #7840

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.

Please Log in to join the conversation.

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).

Please Log in to join the conversation.

Last edit: by György Réthy.

Charstring comparison 09 Jul 2014 11:07 #7843

Hi György,

thank you for your answer! You have solved my doubts about this problem.

Please Log in to join the conversation.

Charstring comparison 09 Jul 2014 11:28 #7844

:-).

You are welcome!

Please Log in to join the conversation.

  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin