This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

StringTake

Updated In 6 Graphic
StringTake["string", n]
gives a string containing the first n characters in "string".
StringTake["string", -n]
gives the last n characters in "string".
StringTake["string", {n}]
gives the n^(th) character in "string".
StringTake["string", {m, n}]
gives characters m through n in "string".
StringTake["string", {spec1, spec2, ...}]
gives a list of the substrings specified by the speci.
StringTake[{s1, s2, ...}, spec]
gives the list of results for each of the si.
  • StringTake["string", {m, n, s}] gives characters m through n in steps of s.
  • StringTake uses the standard Mathematica sequence specification.
New in 2 | Last modified in 6