Octave strcat ignores added spaces
问题 Octave adds spaces with strcat In Octave I run these commands: strcat ("hel", " ", "lo") I get this result: ans = hello Instead of what I expected: ans = hel lo strcat to me sounds like "concatenate strings". A space is a valid character, so adding a space should be OK. Matlab has the same behaviour, so it's probably intended. I find it counter intuitive. Does this behavior makes sense? 回答1: Hmm. It works how it is defined: "strcat removes trailing white space in the arguments (except within