.. highlightlang:: us .. _strspn: strspn ====== .. index:: strspn .. us.tag strspn NOTREADYENGLISH STR :ref:`strspn` returns the index of the first character in *smString1* that does not belong to the set of characters in *ssString2*. .. function:: smIndex = strspn(smString1, ssString2) .. us.return **Return Value** *smIndex* is a matrix with the same dimension as *smString1*. Each element is the index of the first character in *smString1* that does not belong to the set of characters in *ssString2*. The index starts with 1. If all characters in *smString1* belong to the set of characters in *ssString2*, the function return 0. .. us.params **Parameters** .. uparam:: smString1 *smString1* is a string matrix. .. uparam:: ssString2 *ssString2* is a scalar string. .. seealso:: :ref:`overview-strings`, :ref:`strmatch`, :ref:`strtok`, :ref:`strfindreplace`, :ref:`strextract`, :ref:`strfind` :sub:`id-1212479`