Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: working with large strings.

  • To: mathgroup at
  • Subject: [mg21685] RE: [mg21615] working with large strings.
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Fri, 21 Jan 2000 04:00:44 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Dustin Soodak  wanted an efficient way to change some characters in a very
long string.

Use the following:


StringReplacePart["string", "snew", {m, n}] replaces the characters at
positions m through n in "string" by "snew". StringReplacePart["string",
"snew", {{m1, n1}, {m2, n2}, ... }] inserts copies of "snew" at several
positions. StringReplacePart["string", {"snew1", "snew2", ... }, {{m1, n1},
{m2, n2}, ... }] replaces characters at positions mi through ni in "string"
by "snewi".

In the example below the 10th through 15th characters are replaced with



Ted Ersek

On 12-18-99 Mathematica tips, tricks at
had a major update

  • Prev by Date: Re: Fast Fourier Transforms
  • Next by Date: Re: number types
  • Previous by thread: Re: working with large strings.
  • Next by thread: RE: working with large strings.