Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - 日本語


strcspn

lengths from the beginning of texts until a character among those prohibited

Syntax

res = strcspn(Strings, forbiddenChars)

引数

Strings

文字列または文字列の行列

forbiddenChars

文字列または文字列の行列

res

Matrix of positive real integers, of the size of Strings: lengths of the selected Strings heads.

説明

res = strcspn(Strings, forbiddenChars)は, Stringsの中で forbiddenCharsの一部の文字のどれかが最初に現れる位置を 探し,それが最初に現れるまでのStringsの文字数を返します.

forbiddenCharsの次元がStringsと 同じ,またはforbiddenCharsが文字列である必要があります.

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

参照

  • strspn — lengths of the beginning of strings as long as characters are among those allowed
Report an issue
<< strcmp Strings strindex >>

Copyright (c) 2022-2024 (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:
Thu Oct 24 11:17:42 CEST 2024