<cfset str = ".sgod etah I .skrab dna riah tuo evael yehT">
<cfset part = "">
<cfset newStr = "">
<cfset realStr = "">
<cfloop to="1" from="#Len(str)#" step="-1" index="i">
<cfset part = mid(str, i, 1)>
<cfset newStr = newStr & part>
<cfif mid(str, i - 1, 2) eq ". ">
<cfset realStr = newStr & realStr>
<cfset newStr = "">
</cfif>
</cfloop>
<cfoutput>#newStr#</cfoutput>
that was a fun challenge, I THINK this will work, heh.
-----Original Message-----
From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 6:04 PM
To: CF-Talk
Subject: Re: Put into Reverse (cf_hinojosa)
Guess my example was wrong, hebrew is more likely to look like this:
".sgod etah I .skrab dna riah tuo evael yehT"
which gives out (using cf_hinojosa)
"They leave out hair and barks. I hate dogs."
And THATS the same problem I get with hebrew.
Michael.
---- Original Message -----
From: "Hinojosa, Robert A" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 11:43 PM
Subject: RE: Put into Reverse
> This should work.
>
> <cfset str = ".skrab dna riah tuo evael yehT .sgod etah I">
> <cfset newStr = "">
> <cfloop to="1" from="#Len(str)#" step="-1" index="i">
> <cfset newStr = newStr & mid(str, i, 1)>
> </cfloop>
> <cfoutput>#newStr#</cfoutput>
>
>
>
> -----Original Message-----
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 30, 2001 5:25 PM
> To: CF-Talk
> Subject: Put into Reverse
>
>
> I'm having difficulties reversing a long string that was written in
backward
> hebrew.
> which means it was first written from right to left AND opposite (dont
> ask...)
>
> something like:
> skrab dna riah tuo evael yehT. sgod etah I.
>
> I want to get this string back to it's straight form
> ("I hate dogs. They leave out hair and barks.").
>
> Reversing all the string won't help, neither will reversing each word and
> sticking it together (sentences won't be in order). I had limited success
> when
> trying to first split the sentences ("." as the delimter), but no 100%
> solution.
> I know this is doable, because Internet Explorer uses the Visual Encoding,
> which
> acts the same (on the same text).
>
> ! pleH
>
> leahciM
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists