diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-31 19:34:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-31 19:34:22 +0300 |
commit | be6e852a52610e5715a6cb87d606647e39a6b487 (patch) | |
tree | 9c4751dfe64fe655903832d68570f244cc79d9c9 /hercules/code/stringutils.py | |
parent | 746192af34a65504cb86a4eca068a8f0fbb361f5 (diff) | |
download | tools-be6e852a52610e5715a6cb87d606647e39a6b487.tar.gz tools-be6e852a52610e5715a6cb87d606647e39a6b487.tar.bz2 tools-be6e852a52610e5715a6cb87d606647e39a6b487.tar.xz tools-be6e852a52610e5715a6cb87d606647e39a6b487.zip |
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.
Diffstat (limited to 'hercules/code/stringutils.py')
-rw-r--r-- | hercules/code/stringutils.py | 7 |
1 files changed, 7 insertions, 0 deletions
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 |