stok - string tokenizer

版本 1.0.0.0 (792 字节) 作者: Michael Yoshpe
Find the addresses of tokens in the strings
1.5K 次下载
更新时间 2006/10/25

无许可证

%******************************************************************************
% function stok
% Purpose: Find the addresses of tokens in the strings
% Input:
% str - character string to be searched for tokens
% delim - character string holding the token delimiters
% maxtok - maximum allowed number of tokens
% Output:
% strtok - return the number of tokens in the string
% istart - integer array holding the token starting positions in str
% iend - integer array holding the token ending positions in str
% Usage example:
% str='ab;cd de=0'; delim='; ='; [istart, iend] = stok(str, '; =')
% istart =
% 1 4 7 10
% iend =
% 2 5 8 10
% str(istart(1):iend(1))
% ans =
% ab

引用格式

Michael Yoshpe (2024). stok - string tokenizer (https://www.mathworks.com/matlabcentral/fileexchange/12778-stok-string-tokenizer), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R12
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 String Parsing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0