summaryrefslogtreecommitdiffstats
path: root/library/word.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-08-19 02:59:40 (GMT)
committerhobbs <hobbs>1999-08-19 02:59:40 (GMT)
commit827f1718a3c6ad6738473fca1d9ca562ece38f91 (patch)
treead660b8fb995c85c6ffd337c8056ed293d139e53 /library/word.tcl
parent92e37b2bd18d8a5451699c466c1664e53403da57 (diff)
downloadtcl-827f1718a3c6ad6738473fca1d9ca562ece38f91.zip
tcl-827f1718a3c6ad6738473fca1d9ca562ece38f91.tar.gz
tcl-827f1718a3c6ad6738473fca1d9ca562ece38f91.tar.bz2
1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* library/auto.tcl: * library/init.tcl: * library/ldAout.tcl: * library/package.tcl: * library/safe.tcl: * library/word.tcl: * library/http2.1/http.tcl: * library/msgcat1.0/msgcat.tcl: updated libraries to better Tcl style guide (no more string comparisons with == or !=, spacing changes).
Diffstat (limited to 'library/word.tcl')
-rw-r--r--library/word.tcl8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/word.tcl b/library/word.tcl
index 0c8d576..d0d8a60 100644
--- a/library/word.tcl
+++ b/library/word.tcl
@@ -10,12 +10,12 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: word.tcl,v 1.4 1999/04/16 00:46:57 stanton Exp $
+# RCS: @(#) $Id: word.tcl,v 1.5 1999/08/19 02:59:40 hobbs Exp $
# The following variables are used to determine which characters are
# interpreted as white space.
-if {$tcl_platform(platform) == "windows"} {
+if {[string equal $tcl_platform(platform) "windows"]} {
# Windows style - any but space, tab, or newline
set tcl_wordchars "\[^ \t\n\]"
set tcl_nonwordchars "\[ \t\n\]"
@@ -58,7 +58,7 @@ proc tcl_wordBreakAfter {str start} {
proc tcl_wordBreakBefore {str start} {
global tcl_nonwordchars tcl_wordchars
- if {[string compare $start end] == 0} {
+ if {[string equal $start end]} {
set start [string length $str]
}
if {[regexp -indices "^.*($tcl_wordchars$tcl_nonwordchars|$tcl_nonwordchars$tcl_wordchars)" [string range $str 0 $start] result]} {
@@ -120,7 +120,7 @@ proc tcl_startOfNextWord {str start} {
proc tcl_startOfPreviousWord {str start} {
global tcl_nonwordchars tcl_wordchars
- if {[string compare $start end] == 0} {
+ if {[string equal $start end]} {
set start [string length $str]
}
if {[regexp -indices \