Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

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

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

    JSC_electronics
    New Poster

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

     

    .

    3 REPLIES 3

    nexidator
    Community Moderator
    Community Moderator

    Thanks for the hint!

    We are planning to add the missing OpCon string functions in one of the next versions. I am afraid the CodeChecker is slightly ahead of the times and does not distinguish between the string functions that can already be replaced and the missing ones.

    For the time being, please ignore the CodeChecker findings.

    maj9bj
    Long-established Member

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

    maj9bj
    Long-established Member

    Hello @nexidator

    voice of people 😀 says we need:

    LEFT, RIGHT, MID, REPLACE and maybe some methods know from higher languages like Split, SwapCase, IsDecimal, IsNumeric, IsAscii, Count....

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist