Text.st
changeset 2240 ee1b89564617
parent 2233 04205abedbff
child 2259 d9b94e7b06a5
--- a/Text.st	Mon Sep 14 11:54:45 2009 +0200
+++ b/Text.st	Mon Sep 14 19:49:05 2009 +0200
@@ -1185,6 +1185,23 @@
     "
 !
 
+emphasiseFrom:start to:stop with:newEmphasis
+    "set to the emphasis within some range. return the receiver"
+
+    start to:stop do:[:characterIndex |
+        self emphasisAt:characterIndex put:newEmphasis
+    ].
+
+    "
+     (Text string:'hello') allBold 
+        emphasiseFrom:2 to:4 with:#italic
+
+     Transcript showCR:((Text string:'hello') allBold 
+                            emphasiseFrom:2 to:4 with:#italic)
+
+    "
+!
+
 emphasizeAllWith:emphasis
     "change the emphasis of all characters"
 
@@ -1650,7 +1667,7 @@
 !Text class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.99 2009-09-04 12:45:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.100 2009-09-14 17:49:05 cg Exp $'
 ! !
 
 Text initialize!