Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: shiva kumar
  Where is shiva kumar?
 Hyderabad
 India
 shiva kumar
 Tags
Subject: RE: counting a character frm a string
Thread ID: 189059 Message ID: 189064 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Wednesday, August 13, 2008 9:24:46 AM         
   


> > Hi Shiva -
> >
> > You can use Occurs()
> >
> >
> > hth
> > -Stefan
>
>
> Thank you Stefan
> and how can we check whether
> a string can only be digits and -'s (no space in the middle allowed) like 2-3-5
> no alphabets allowed only digits and '-'
> Shiva

You're welcome. For the second one, you can probably use a textbox.InputMask? If you want to check any string, try ChrTran():
c = "1234-"
? EMPTY(CHRTRAN(c,"0123456789-",""))
c = "1234-a"
? EMPTY(CHRTRAN(c,"0123456789-",""))



hth
-Stefan

ENTIRE THREAD

counting a character frm a string Posted by shiva kumar @ 8/13/2008 9:05:27 AM
RE: counting a character frm a string Posted by Stefan Wuebbe @ 8/13/2008 9:09:33 AM
RE: counting a character frm a string Posted by shiva kumar @ 8/13/2008 9:17:57 AM
RE: counting a character frm a string Posted by Stefan Wuebbe @ 8/13/2008 9:24:46 AM
RE: counting a character frm a string Posted by shiva kumar @ 8/13/2008 9:33:36 AM
RE: counting a character frm a string Posted by Stefan Wuebbe @ 8/13/2008 9:36:54 AM
RE: counting a character frm a string Posted by shiva kumar @ 8/13/2008 9:45:45 AM