Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit box replacement in real time
#8
adding ' or "  marks around the string, I want to make it easier to operate
I thought of the following method, adding it based on the number of spaces at the end of the string
bug, How to apply to the replace operation of the text edit box above 
I tried unsuccessfully

Macro Macro6
Code:
Copy      Help
_s="abc" ;;no space after abc -> out abc
_s="abc " ;;There is a space after abc -> out 'abc'
_s="abc  " ;;There are two spaces after abc -> out "abc"

str pattern2=".+  $"
str pattern1=".+ $"

if(findrx(_s pattern2)=0)
,out F"''{_s.trim}''" ;;out "abc"
else if(findrx(_s pattern1)=0)
,out F"'{_s.trim}'" ;;out 'abc'
else
,out _s ;;out abc


Messages In This Thread
Edit box replacement in real time - by Davider - 08-06-2022, 12:30 AM
RE: Edit box replacement in real time - by Kevin - 08-06-2022, 02:13 AM
RE: Edit box replacement in real time - by Kevin - 08-06-2022, 02:31 PM
RE: Edit box replacement in real time - by Kevin - 08-07-2022, 12:24 PM
RE: Edit box replacement in real time - by Davider - 08-23-2022, 11:53 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)