--- a/Object.st Wed Sep 22 10:17:27 2004 +0200
+++ b/Object.st Wed Sep 22 11:16:59 2004 +0200
@@ -6699,6 +6699,22 @@
"
!
+printStringLimitedTo:sizeLimit
+ "return a string for printing the receiver, but limit the result string in its size."
+
+ |s|
+
+ s := CharacterWriteStream on:(String basicNew:30).
+ s writeLimit:sizeLimit.
+ self printOn:s.
+ ^ s contents.
+
+ "
+ Date today printStringLimitedTo:5.
+ '12345678901234567890' printStringLimitedTo:5.
+ "
+!
+
printStringOnError:exceptionBlock
"return a string for printing the receiver; if any error occurs, return the result from
evaluating exceptionBlock. Useful to print something in an exceptionHandler or other
@@ -9172,7 +9188,7 @@
!Object class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.514 2004-09-22 07:22:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.515 2004-09-22 09:16:59 cg Exp $'
! !
Object initialize!