Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > VFP 9: strtran(...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 781 of 852
Post > Topic >>

VFP 9: strtran() Optional Parms

by Gene Wirchenko <genew@[EMAIL PROTECTED] > Jun 23, 2007 at 10:59 PM

Suppose I have a string where I want to change all "abc" to
"def".  This is easy:
          thing="abcdefghiabcjkl"
          thing=strtran(thing,"abc","def")
What if I want to have it be case-insensitive in the search so that
          thing="aBcdefghiABcjkl"
would also result in two changes?

     The problem is that the flags parm controls case sensitivity, and
I apparently have to specify all parms.
          thing=strtran(thing,"abc","def",,,1)
does not work.  I have to fill in the blanks as in
          thing=strtran(thing,"abc","def",1,n,1)
where n is arbitrarily high.  This is a kludge -- think large memos.
Is there a way to avoid this?

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
     I have preferences.
     You have biases.
     He/She has prejudices.
 




 1 Posts in Topic:
VFP 9: strtran() Optional Parms
Gene Wirchenko <genew@  2007-06-23 22:59:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Tue Jul 8 23:28:22 CDT 2008.