Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Aide Scilab >> Chaînes de caractères > strcspn

strcspn

get span until character in string

Calling Sequence

res = strcspn(string_one, string_two)

Arguments

string_one

a character string or matrix of character strings.

string_two

a character string or matrix of character strings.

res

a matrix.

Description

res = strcspn(string_one,string_two) scans string_one for the first occurrence of any of the characters that are part of string_two, returning the number of characters of string_one read before this first occurrence.

string_two must have same dimensions than string_one or string_two must be a string.

Examples

strcspn("fcba73","1234567890")
strcspn(["fcba73","f7cba73"],"1234567890")
strcspn(["fcba73","f7cba73"],["312","34567890"])

See Also

  • strspn — get span of character set in string
Report an issue
<< strcmpi Chaînes de caractères strindex >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:36:47 CEST 2013