Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trim function that trims all non-printing chars?

Featured Replies

Is there a way to create a trim function that will trim ALL non-printing characters? The built-in Trim function only takes care of leading/trailing spaces.

Barring that, maybe I can set an "In range" limit on the field? But how would I do that if I wanted to include everything except non-printing characters? There are a number of odder characters (punctuation, foreign chars, etc.) I'd like to keep.

In v6, you can use nested Substitute() functions to replace any characters you want with nothing. In v7, you can enter a list of substitutions instead of using nested functions.

  • Author

That's a good idea. Now how can I code somthing like a carriage return? Can I type it in hex or Unicode?

  • 2 weeks later...
  • Newbies

substitute

Well, the substitute function only substitutes each unique, non-overlapping instance of the substituted-for string. Let me use "a" instead of "par.gif" just to keep it clear (if only in my own mind wink.gif ):o

Start with "aaa". Find every occurrence of "aa" -- there's only one, right?

aaa or aaa.

Now delete every occurrence of "aa" and replace it with something, anything, oh, i don't know, let's say "a", and we wind up with

aa

You can get around this feature/limitation (depending on your perspective) by iterating the substitution multiple times:


Loop

..Substitute ( theField , ":paragraph::paragraph:" , ":paragraph:" )

..Exit Loop If ( PatternCount ( theField , ":paragraph::paragraph:" ) = 0 )

End Loop

HTH,

Jerry

HinEnder,

Isn't this for version 7? Or did I miss read something here.

Lee cool.gif

The algorithm can be translated to work in older versions (Bob Weaver's example that you sited used the original substitute() syntax. His was for eliminating spaces, but the same thing can be done for line returns.)

Hi Ender,

Sorry, I guess I didn't make myself very clear. My question about v7, was regards to the Filter part of the calculation. Is that a version 7 feature, or did I miss something?

Lee confused.gif

The filter part is not necessary for this.

Darn, I thought there was a new approach to this in v6 that I had missed. frown.gif

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.