1# textutil.tcl -- 2# 3# Utilities for manipulating strings, words, single lines, 4# paragraphs, ... 5# 6# Copyright (c) 2000 by Ajuba Solutions. 7# Copyright (c) 2000 by Eric Melski <ericm@ajubasolutions.com> 8# Copyright (c) 2002 by Joe English <jenglish@users.sourceforge.net> 9# Copyright (c) 2001-2006 by Andreas Kupries <andreas_kupries@users.sourceforge.net> 10# 11# See the file "license.terms" for information on usage and redistribution 12# of this file, and for a DISCLAIMER OF ALL WARRANTIES. 13# 14# RCS: @(#) $Id: textutil.tcl,v 1.17 2006/09/21 06:46:24 andreas_kupries Exp $ 15 16# ### ### ### ######### ######### ######### 17## Requirements 18 19package require Tcl 8.2 20 21namespace eval ::textutil {} 22 23# ### ### ### ######### ######### ######### 24## API implementation 25## All through sub-packages imported here. 26 27package require textutil::string 28package require textutil::repeat 29package require textutil::adjust 30package require textutil::split 31package require textutil::tabify 32package require textutil::trim 33package require textutil::wcswidth 34 35namespace eval ::textutil { 36 # Import the miscellaneous string command for public export 37 38 namespace import -force string::chop string::tail 39 namespace import -force string::cap string::uncap string::capEachWord 40 namespace import -force string::longestCommonPrefix 41 namespace import -force string::longestCommonPrefixList 42 43 # Import the repeat commands for public export 44 45 namespace import -force repeat::strRepeat repeat::blank 46 47 # Import the adjust commands for public export 48 49 namespace import -force adjust::adjust adjust::indent adjust::undent 50 51 # Import the split commands for public export 52 53 namespace import -force split::splitx split::splitn 54 55 # Import the trim commands for public export 56 57 namespace import -force trim::trim trim::trimleft trim::trimright 58 namespace import -force trim::trimPrefix trim::trimEmptyHeading 59 60 # Import the tabify commands for public export 61 62 namespace import -force tabify::tabify tabify::untabify 63 namespace import -force tabify::tabify2 tabify::untabify2 64 65 # Re-export all the imported commands 66 67 namespace export chop tail cap uncap capEachWord 68 namespace export longestCommonPrefix longestCommonPrefixList 69 namespace export strRepeat blank 70 namespace export adjust indent undent 71 namespace export splitx splitn 72 namespace export trim trimleft trimright trimPrefix trimEmptyHeading 73 namespace export tabify untabify tabify2 untabify2 74} 75 76 77# ### ### ### ######### ######### ######### 78## Ready 79 80package provide textutil 0.9 81