Compare Strings (C-convention)

版本 1.0.0.0 (412 字节) 作者: Stijn Helsen
This function compares two strings using C-convention.
2.3K 次下载
更新时间 2003/9/22

无许可证

This (old) function compares two strings and gives an output similar to the C-function strcmp.
Unlike the MATLAB strcmp function the strings are compared in the alphabetical order.

c=strcmp(s1,s2)

c : -1 if s1<s2, 0 if s1==s2, +1 if s1>s2.

(This is an old function, which I wanted to supply now....)

引用格式

Stijn Helsen (2025). Compare Strings (C-convention) (https://www.mathworks.com/matlabcentral/fileexchange/3987-compare-strings-c-convention), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R10
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息
致谢

启发作品: lexcmp, String comparison

Community Treasure Hunt

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

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