Hi Gagan,

See if this is useful....

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical">
    <mx:Script>
        <![CDATA[
            private function convert():void{
                var txt:String = myText.text;
                while (txt.indexOf("\\")>=0)
                {
                    txt = txt.replace("\\","(c)");
                }
                result.text = txt;

            }
        ]]>
    </mx:Script>
    <mx:TextInput id="myText"/>
    <mx:Button click="convert()"/>
    <mx:Label id="result"/>
</mx:Application>


Regards,
Venkat
www.venkatv.com

On Mon, Nov 10, 2008 at 4:51 PM, Vinod M. Jacob <[EMAIL PROTECTED]> wrote:

> I think you need to check each char in the string.
>
>
> On Mon, Nov 10, 2008 at 12:53 PM, GAGAN anand <[EMAIL PROTECTED]>wrote:
>
>> My query is that I have to take input from user in a text box in which he
>> can type backslash character and I have to send the text input by user in a
>> URL as a parameter and I have to replace backslash with a unicode value.
>>
>> But Flex does not understand single backslash input by the user. So how
>> could I search backslash character in the text?
>>
>> Thanx for the replies
>>
>> Regards
>> Gagan
>>
>>
>>   On 10/11/2008, Vinod M. Jacob <[EMAIL PROTECTED]> wrote:
>>>
>>> I am sorry ....try what venkat has suggested
>>>
>>> On Sun, Nov 9, 2008 at 9:22 PM, Venkat Viswanathan <
>>> [EMAIL PROTECTED]> wrote:
>>>
>>>> Hi Gagan,
>>>>
>>>> Try this:
>>>>
>>>> var aa:String = "The \\ country";
>>>>                 var pos:int = aa.indexOf("\\");
>>>>                 Alert.show(String(pos));
>>>>
>>>> Regards,
>>>> Venkat
>>>> www.venkatv.com
>>>>
>>>>
>>>> On Fri, Nov 7, 2008 at 7:38 PM, GAGAN anand <[EMAIL PROTECTED]>wrote:
>>>>
>>>>> I am saking for \ slash not for this / slash
>>>>>
>>>>>
>>>>> On 07/11/2008, Vinod M. Jacob <[EMAIL PROTECTED]> wrote:
>>>>>>
>>>>>> Try this
>>>>>>
>>>>>> private function searchText():void{
>>>>>>    var str:String = "To find the/ in sentence.";
>>>>>>    Alert.show(str.search("/").toString());
>>>>>> }
>>>>>>
>>>>>> On Fri, Nov 7, 2008 at 5:15 PM, Gags <[EMAIL PROTECTED]> wrote:
>>>>>>
>>>>>>>
>>>>>>> Hi All
>>>>>>>
>>>>>>> I have one query related to search function of string.
>>>>>>>
>>>>>>> I am having one string containing one backslash (\) character also.
>>>>>>>
>>>>>>> Is it possible to search that backslash character?
>>>>>>>
>>>>>>> Any help would be gr8.
>>>>>>>
>>>>>>> Thanks in Advance
>>>>>>>
>>>>>>> Regards
>>>>>>> Gagan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> >>>>
>>>>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to