String function RIGHT (STR, SIZE) and LEFT (STR, SIZE) and coding guideline rule E112

The RIGHT (STR, SIZE) and LEFT (STR, SIZE) functions are not OpCon string functions and therefore do not comply with the E112 rule "Use the OpCon string functions to work with strings".

I don't see a way to achieve a similar result using OpCon string functions. Is there any way?

I know I can use OpconMemSet or a similar approach, but I'd rather have something like OpconStrRight(pStr, size) and OpconStrLeft(pStr, size).

 

.

Best reply by maj9bj

LEFT, RIGHT string can be substituted by use of OpconStrDelete. You can delete all characters from specified character to right and then content on the left remains and vice versa. But it is not much comfortable. 😡

View original
3 replies
Resolved