Jump 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 white space characters

Featured Replies

You'd think that there would have been a built-in function to trim white space characters (<space>, <tab>, <CR>) from the beginning and end of a text string, but the Trim() function only trims spaces. The following formula will trim off all white space characters from the beginning and end of a text string, but leave any embedded ones intact.

Let([t=InputText;

tab=" "; //The literal contains a tab character

L=Left(t;Position(t;LeftWords(t;1);1;1)-1);

L1=Substitute("x"&L;[" ";"s"];[

You mentioned it in the end, why not use:

Substitute ( MiddleWords(Substitute ( Input ; "." ; "

How does one type the "

Option o on a Mac. Probably not doable on a XP.

LOL

Lede

How does one type the "
  • Author

Ahem....

Just to get back to the original discussion. smile.gif

For S

  • 4 months later...

Bob, I'm interested in using your formula to 'clean' data... I'm wondering if you could upload an FMP file with it embedded that I could just copy/paste from? (My browser window drops all special characters from your formula, rendering it incomplete.) Thanks,

Jim

Edited by Guest

  • 3 weeks later...

Do you have developer/advanced? If so, you can use a recursive function such as:

TrimP(text)=

// TrimP strips spaces and carriage returns from text

Case(

Left(text;1)="¶" or Left(text;1) = " ";

TrimP(Right(text;Length(text)-1));

Right(text;1)="¶" or Right(text;1) = " ";

TrimP(Left(text;Length(text)-1));

text)

This just removed paragraph marks and spaces, but you can set it to get rid of whatever you want.

Jeff

  • 4 weeks later...

ø = alt+0248 ;)

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.