Forum Discussion

slaugier's avatar
slaugier
Occasional Contributor
6 years ago
Solved

Trouble to use aqString.Find in a if condition

Hello   I have a text file, I want to copy it to a new file. I want to modify it by using aqString.Replace with some substrings found by aqString.Find. But aqString.Find seems to find nothing. A...
  • slaugier's avatar
    6 years ago

    Thank you! It helped me a lot! 

     

    And I had to correct this way to solve everything :

     

      if (aqString.Find(bLine, "data") != -1) 
       {               
       bLine = aqString.Replace(bLine,"data", "data" + count)               
       }              
      if (aqString.Find(bLine, "idChart") != -1) 
       {                
       bLine = aqString.Replace(bLine,"idChart", "idChart" + count)               
       }              
      if (aqString.Find(bLine, "chart") != -1)  
       {                
       bLine = aqString.Replace(bLine,"chart", "chart" + count)                
       }