PurchPackingSlipJournalCreate class -> initHeader method have a line;
vendPackingSlipJour.PackingSlipId = purchParmTable.Num;
but i want when i copy and paste ' FDG 2020 ' (all blanks are tab character) in Num area and click okey, write this value as 'FDG2020' in the PackagingSlipId field of the vendPackingSlipJour table.
I tried -> vendPackingSlipJour.PackingSlipId = strRem(purchParmTable.Num, " "); but doesn't work for tab character.
How can i remove all whitespace characters from string?
Version 1
Try the
strAlpha()function.From the documentation:
Version 2
Because version 1 also deletes allowed hyphens (
-), you could usestrKeep().From the documentation:
This will require you to specify all desired characters, a rather long list...
Version 3
Use regular expressions to replace any unwanted characters (defined as "not a wanted character"). This is similar to version 2, but the list of allowed characters can be expressed a lot shorter.
The example below allows alphanumeric characters(
a-z,A-Z,0-9), underscores (_) and hyphens (-). The final value fornewTextisABC-12_3.Version 4
If you know the only unwanted characters are tabs (
'\t'), then you can go hunting for those specifically as well.