Unix and Linux Discussions Tagged with split |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
4 |
20,797 |
UNIX for Beginners Questions & Answers |
|
|
|
9 |
13,270 |
UNIX for Beginners Questions & Answers |
|
|
|
11 |
10,354 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,235 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
10,437 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
7,437 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
3,339 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
8,994 |
Shell Programming and Scripting |
|
|
|
7 |
9,338 |
Shell Programming and Scripting |
|
|
|
7 |
5,854 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,153 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
6,865 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
3,275 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
25,646 |
Solaris |
|
|
|
5 |
5,466 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
26,847 |
Solaris |
|
|
|
3 |
3,682 |
UNIX for Beginners Questions & Answers |
|
|
|
20 |
10,142 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
3,443 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
2,971 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
10,245 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
3,513 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
4,950 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
7,411 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
2,604 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
3,952 |
Shell Programming and Scripting |
|
|
|
36 |
37,181 |
Shell Programming and Scripting |
|
|
|
3 |
3,845 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,559 |
Shell Programming and Scripting |
|
|
|
9 |
3,720 |
Shell Programming and Scripting |
|
|
|
2 |
4,939 |
Shell Programming and Scripting |
|
|
|
4 |
4,490 |
Shell Programming and Scripting |
|
|
|
8 |
3,492 |
Shell Programming and Scripting |
|
|
|
9 |
15,259 |
UNIX for Beginners Questions & Answers |
|
|
|
11 |
11,740 |
UNIX for Beginners Questions & Answers |
|
|
|
23 |
5,243 |
Shell Programming and Scripting |
|
|
|
9 |
2,801 |
Shell Programming and Scripting |
|
|
|
7 |
4,915 |
Shell Programming and Scripting |
|
|
|
7 |
10,925 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
2,267 |
UNIX for Beginners Questions & Answers |
textutil::split(n) Text and string utilities, macro processing textutil::split(n)
__________________________________________________________________________________________________________________________________________________
NAME
textutil::split - Procedures to split texts
SYNOPSIS
package require Tcl 8.2
package require textutil::split ?0.7?
::textutil::split::splitn string ?len?
::textutil::split::splitx string ?regexp?
_________________________________________________________________
DESCRIPTION
The package textutil::split provides commands that split strings by size and arbitrary regular expressions.
The complete set of procedures is described below.
::textutil::split::splitn string ?len?
This command splits the given string into chunks of len characters and returns a list containing these chunks. The argument len
defaults to 1 if none is specified. A negative length is not allowed and will cause the command to throw an error. Providing an
empty string as input is allowed, the command will then return an empty list. If the length of the string is not an entire multiple
of the chunk length, then the last chunk in the generated list will be shorter than len.
::textutil::split::splitx string ?regexp?
This command splits the string and return a list. The string is split according to the regular expression regexp instead of a simple
list of chars. Note that if you parentheses are added into the regexp, the parentheses part of separator will be added into the
result list as additional element. If the string is empty the result is the empty list, like for split. If regexp is empty the
string is split at every character, like split does. The regular expression regexp defaults to "[\t \r\n]+".
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category textutil
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO
regexp(n), split(n), string(n)
KEYWORDS
regular expression, split, string
textutil 0.7 textutil::split(n)