Compare Strings (C-convention)

This function compares two strings using C-convention.
2,3K download
Aggiornato 22 set 2003

Nessuna licenza

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....)

Cita come

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

Compatibilità della release di MATLAB
Creato con R10
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Characters and Strings in Help Center e MATLAB Answers
Riconoscimenti

Ispirato: lexcmp, String comparison

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0