I'm trying to port some Python code to C, but I came across this line and I can't figure out what it means:
if message.startswith('<stream:stream'):
message = message[:-1] + ' />'
I understand that if 'message
starts with <stream:stream
then something needs to be appended. However I can't seem to figure out where it should be appended. I have absolutely no idea what :-1
indicates. I did several Google searches with no result.
Would somebody be so kind as to explain what this does?