diff options
author | Filippos Karapetis | 2016-01-15 03:25:40 +0200 |
---|---|---|
committer | Filippos Karapetis | 2016-01-15 03:25:40 +0200 |
commit | 2a4b04f3b28a924cad402f21979e143fa5cd248a (patch) | |
tree | c9b2123ccaf80ed150b10914a3c519e789b7f319 /engines/sci/engine/kstring.cpp | |
parent | a5a531ec9f5c6f6f6d550a4f0d7034110ec1c02a (diff) | |
download | scummvm-rg350-2a4b04f3b28a924cad402f21979e143fa5cd248a.tar.gz scummvm-rg350-2a4b04f3b28a924cad402f21979e143fa5cd248a.tar.bz2 scummvm-rg350-2a4b04f3b28a924cad402f21979e143fa5cd248a.zip |
SCI: Add an initial implementation of kStringTrim
Thanks to lskovlun for his help
Diffstat (limited to 'engines/sci/engine/kstring.cpp')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index cd0d6af936..310e38dbd1 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -860,7 +860,12 @@ reg_t kStringAtoi(EngineState *s, int argc, reg_t *argv) { } reg_t kStringTrim(EngineState *s, int argc, reg_t *argv) { - warning("kStringTrim (argc = %d)", argc); + Common::String string = s->_segMan->getString(argv[0]); + + string.trim(); + // TODO: Second parameter (bitfield, trim from left, right, center) + warning("kStringTrim (%d)", argv[1].getOffset()); + s->_segMan->strcpy(argv[0], string.c_str()); return NULL_REG; } |