Octave strings comparison
godarda@gd:~$ octave
...
octave> gd = "GoDarda"
gd = GoDarda

octave> strcmp(gd, "GoDarda")
ans = 1

octave> strcmp(gd, "KODINGWINDOW")
ans = 0

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

octave> strcmpi("GD#12","gd#12")
ans = 1

octave> strcmpi("GD#12","gd#21")
ans = 0

octave> strncmpi("GD#12","gd",2)
ans = 1

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

octave> ischar(gd)
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