Table Of Contents

strcmp_ni

Version:
    Last Modified: March 15, 2017

    Performs a case-insensitive comparison of the first n characters in input strings.

    Syntax

    c = strcmp_ni(a, b, n)
    Legacy name: strncmpi

    Inputs

    a

    String or vector of strings. MathScript first flattens string vectors before the strings will be compared.

    b

    String or vector of strings. MathScript first flattens string vectors before the strings will be compared.

    n

    Number of characters in a and b to compare. n is a positive integer.

    Outputs

    c

    1 if the first n characters in a and b are the same. Otherwise, strcmp_ni returns 0. c is a Boolean.

    A = 'this is a test for findstr'
    B = 'This can not be true'
    C = strcmp_ni(A, B, 3)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics