Impressum
GoTo:
Home
 
Médecins Sans Frontičres | Ärzte ohne Grenzen Akazien Verlag   
 
Lesezeichen [ Jobs # QR-Code # MagicWords ]Do 21 Nov 2024 10:34:25


 huecker.com # Grundlagen der Programmierung | Tcl Tutorial.
--

 

. String Subcommands - length index range .

[ Previous | Index | Next ]

One feature of Tcl is that commands may have subcommands. String is an example of one of these. The string command treats the first argument as a subcommand. This lesson covers these string subcommands:

string length string
Returns the length of string
string index string index
Returns the char at the index'th position in string
string range string first last
Returns a string composed of the characters from first to last

--

. Example .

   set string "this is my test string"

   puts "There are [string length $string] characters in \"$string\""

   puts "[string index $string 1] is the second character in \"$string\""

   puts "\"[string range $string 5 10]\" are characters between the 5'th and 10'th"
  

--
[ Home | Top ]
[ . Previous | Index | Next . ]
Der Inhalt dieser Seite wurde am 31.08.2024 um 13.36 Uhr aktualisiert.
Navigation Seminare Magic Software Projekte Publikationen Kontakt Home
 
   huecker dot com * Germany | Datenschutz
© 1999, 2024 Franz-Josef Hücker. All Rights Reserved.
Contact Print Page LinkedIn follow me on twitter RSS Feeds & Podcasts