From be6e852a52610e5715a6cb87d606647e39a6b487 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 Oct 2014 19:34:22 +0300 Subject: hercules: add basic support for converting npc scripts from evol to hercules. Can convert script line in npc scripts. Can create map_index.txt and map.conf based on npc dir. --- hercules/code/stringutils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hercules/code/stringutils.py') diff --git a/hercules/code/stringutils.py b/hercules/code/stringutils.py index 09e3cf8..3d0b77a 100644 --- a/hercules/code/stringutils.py +++ b/hercules/code/stringutils.py @@ -26,3 +26,10 @@ def strToXml(data): data = data.replace("<", "<"); data = data.replace(">", ">"); return data + +def stripNewLine(data): + if len(data) == 0: + return data + if data[-1] == "\n": + data = data[:-1] + return data -- cgit v1.2.3-70-g09d2