changeset 295:9a30510f6e52

Fix trim method on strings
author Michael Pavone <pavone@retrodev.com>
date Thu, 24 Jul 2014 23:51:54 -0700
parents d1dc2d70bdfd
children 2a0a88799737
files modules/string.tp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/string.tp	Thu Jul 24 21:58:26 2014 -0700
+++ b/modules/string.tp	Thu Jul 24 23:51:54 2014 -0700
@@ -47,8 +47,8 @@
 		}
 	}
 
-	llMessage: print withVars: {} andCode: {
-		fwrite: data 1 bytes stdout
+	print <- {
+		(file stdout) write: self
 		self
 	}
 
@@ -295,11 +295,11 @@
 		end <- l
 		while: {
 			if: end > 0 {
-				b <- byte: end
+				b <- byte: end - 1
 				b = space || b = tab || b = nl || b = cr
 			}
 		} do: {
-			end <- end + 1
+			end <- end - 1
 		}
 		from: start withLength: (end - start)
 	}