Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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

working with large strings.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21615] working with large strings.
  • From: dustin <dsoodak at virtu.sar.usf.edu>
  • Date: Tue, 18 Jan 2000 02:35:07 -0500 (EST)
  • Organization: University of South Florida
  • Sender: owner-wri-mathgroup at wolfram.com

If you want to write a program that alters elements of very large lists
you can alter single elements with

largelist[[elementnumber]]=newvalue;

However, if you want to do this with a large string you have to do
something like

largestring=StringTake[largestring,{1,elementnumber-1}]<>newvalue<>StringTake[largestring,{1,elementnumber+1}];

The problem with this is it requires making a whole new copy of the
string to change just one element.  This will really slow a program down
if you are working with large strings or have to repeat the process many
times.

Does anyone know a way around this?

Dustin Soodak



  • Prev by Date: Re: Series expansion of ArcSin around 1
  • Next by Date: Header/Footer formatting question.
  • Previous by thread: Time series analysis
  • Next by thread: Re: working with large strings.