Hi Dave,

Assuming that the whitespace always starts on char 1 of the line, this should work:

function whiteSpace theText
  return char 1 to (offset(word 1 of theText,theText) - 1) of theText
end whiteSpace

function whiteChunk theText
  return "char 1 to" && (offset(word 1 of theText,theText) - 1)
end whiteChunk

Best,

Mark

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

A large collection of scripts for HyperCard, Revolution, SuperCard and other programming languages can be found at http://runrev.info




On 25 mrt 2008, at 22:08, David Bovill wrote:
I want to get hold of the "white space" - ie tabs or space - before the first word of a line. I can do it of course with repeat loops - but is there
a way using Revs built in chunks?

Something like:

   put word 0 to 1 of "      first second"

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to