• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re(2): Counting Words and Characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re(2): Counting Words and Characters


  • Subject: Re(2): Counting Words and Characters
  • From: "Arthur Cormack" <email@hidden>
  • Date: Fri, 13 Jul 2001 13:15:51 -0400

Thank you Michelle.
It looks like this will work ... if you know what
>wordtochange
(if you know that it is "jumped", for example) is.
If you don't know what the word is(??????), and do know what word
number (~word 5 of stringtochange) it is in the line, is there any
way of figuring out what that word's offset is?

Regards,
And many thanks.


Arthur

email@hidden writes:
>set stringtochange to "The quick brown fox jumped over the dirty
>black
>dog's head."
>set wordtochange to "jumped"
>set newword to "leaped"
>set beforesnip to (offset of wordtochange in stringtochange) - 1
>set wordlength to length of wordtochange
>set aftersnip to beforesnip + wordlength + 1
>set newstring to text 1 through beforesnip of stringtochange &
>newword &
>text aftersnip through -1 of stringtochange


References: 
 >Re: Counting Words and Characters (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Counting Words and Characters
  • Next by Date: Re: Re(2): Counting Words and Characters
  • Previous by thread: Re: Counting Words and Characters
  • Next by thread: Re: Counting Words and Characters
  • Index(es):
    • Date
    • Thread