CR/LF (linebreak) in a field

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
manolo7
Posts: 7
Joined: 2009-06-18 10:29:45

CR/LF (linebreak) in a field

Post by manolo7 »

Does anybody know how to find the CR/LF (linebreak) sequence in one of AMC fields (DESCRIPTION for example)? I need to replace a part of the field and that part contain some CR/LF.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Linebreak is #13#10
Tab is #9

e.g.

Code: Select all

value := StringReplace(value, #13#10, ' ');  // replaces all linebreaks with spaces
manolo7
Posts: 7
Joined: 2009-06-18 10:29:45

Post by manolo7 »

While is not exactly what I want, is an important step forward for me. I never noticed the StringReplace function before.

Thank you bad4u.
manolo7
Posts: 7
Joined: 2009-06-18 10:29:45

Post by manolo7 »

I never noticed the StringReplace function before
Shame on me.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

For scripting procedures and functions I really recommend having a closer look on the help file (>Technical information >Script files creation). Or simply click on help button while inside scripts editor ;)
Post Reply