Table Of Contents

findstr

Version:
    Last Modified: March 15, 2017

    Finds all occurrences of a string within another string. Unlike in the strfindall function, the order of parameters in findstr is not important. MathScript searches the longer string for occurrences of the shorter string.

    Syntax

    c = findstr(a, b)

    Inputs

    a

    String.

    b

    String.

    Outputs

    c

    Starting indexes in the longer string of all occurrences of the shorter string you want to find. c is a row vector.

    A = 'this is a test for findstr'
    B = 'is'
    C = findstr(A, B)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics