edmiLike

EdmiError edmiLike(SdaiString  operand1,
                    SdaiString  operand2, 
                    SdaiInteger options, 
                    SdaiLogical *result); 

This function implements an extended version of the LIKE operation in the Express language as defined in section 12.2.5 in ISO 10303-11:1994(E) : The EXPRESS Language Reference Manual. The extension is that optionally the operation can do case insensitive comparison.

Arguments


TypeNameComment
SdaiString

operand1

The target string (left operand).

SdaiString

operand2

The pattern string (right operand).  The pattern matching characters are:@ Matches any letter^ Matches any upper case letter? Matches any character& Matches remainder of string# Matches any digit$ Matches a substring terminated by a space character or end-of-string*Matches any number of characters\ Begins a pattern escape sequence! Negation character (used with the othercharacters)

SdaiInteger

options

Specifies the options of the operation

SdaiLogical

result

Address of a SdaiLogical variable that receives the result of the operation. The result is as follows:

  • sdaiTRUE: actual string matches specified pattern
  • sdaiFALSE: actual string does not match specified pattern
  • sdaiUNKNOWN: error in operation or at least one unset argument.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

Options


 

OptionComment

CASE_SENSITIVE

Characters are compared case sensitive. The interpretation of the pattern matching characters are as described in <operand2> argument. CASE_SENSITIVE is the default behavior of the LIKE operation, i.e., when none of the options CASE_SENSITIVE and CASE_INSENSITIVE are set.

CASE_INSENSITIVE

Characters are compared case insensitive. The interpretation of the pattern matching characters are as described in <operand2> argument.

Example


 

 SdaiAppInstance currInst;
 SdaiLogical result;
 EdmiError rstat;
 . . .
 if (rstat = edmiLike ("\AAAA", "
A?AA", CASE_SENSITIVE, &result)) {
 /* Error in operation */ 
 printf("\nError: %s in edmiLike\n", 
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 if (result == sdaiTRUE) {
 printf("\nString: %s matches pattern: %s", "
AAAA", "\\\\A?AA"); 
 }
 . . .

 

See also

Filter by label

There are no items with the selected labels at this time.

Â