Octave strings comparison
codeaft@codeaft:~$ octave
...
octave> codeaft = "Codeaft"
codeaft = Codeaft

octave> strcmp(codeaft, "Codeaft")
ans = 1

octave> strcmp(codeaft, "CODEAFT")
ans = 0

octave> strncmp(codeaft, "Koding", 6)
ans = 1

octave> strcmpi("Codeaft#12","codeaft#12")
ans = 1

octave> strcmpi("Codeaft#12","codeaft#21")
ans = 0

octave> strncmpi("Codeaft#12","codeaft",2)
ans = 1

octave> strrep(codeaft, "in", "#")
ans = Kod#gw#dow

octave> ischar(codeaft)
ans = 1

octave> a="Hello"
a = Hello

octave> b="hello"
b = hello

octave> a==b
ans =

  0  1  1  1  1

octave> b="Hello"
b = Hello

octave> a==b
ans =

  1  1  1  1  1

Comments and Reactions