Expand my Community achievements bar.

SOLVED

Best way to replace a character from a string

Avatar

Level 5

What is the best way to remove a character from a string? Currently I am using this implementation to remove a comma from a string. Does the emptystring variable leave unexpected characters?

Lawson02_0-1721939865667.png

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 6

That should work.  emptystring is the same as "" in most programming languages -- a blank string of 0 length.  It is different than null and ignore, though has a "falsy" aspect to it.  (Fusion's backend is JavaScript, so you can imagine there's some overlap there.)

View solution in original post

2 Replies

Avatar

Correct answer by
Level 6

That should work.  emptystring is the same as "" in most programming languages -- a blank string of 0 length.  It is different than null and ignore, though has a "falsy" aspect to it.  (Fusion's backend is JavaScript, so you can imagine there's some overlap there.)

Avatar

Level 5

Based on some testing I had assumed that it was just that but I wanted to make sure and see if others were doing it any other way. Thanks for the quick response.