str_removeExtra_SpcTab start time : 8Apr2022 12h25m46s +--+-----+-------------------------------------------------------------------------+ |OK|test#|dat0 | +--+-----+-------------------------------------------------------------------------+ | l|t01 | NONLOCAL chr_tab chr_newline chr_carriagereturn chr_space ; | +--+-----+-------------------------------------------------------------------------+ | l|t02 |IF (= o non_whitespace_list@i) THEN first_chr := i ; EXIT ; ENDIF ;| +--+-----+-------------------------------------------------------------------------+ | l|t03 |krhello world hhrr | +--+-----+-------------------------------------------------------------------------+ | l|t04 | | +--+-----+-------------------------------------------------------------------------+ | l|t05 | | +--+-----+-------------------------------------------------------------------------+ | l|t06 |end | +--+-----+-------------------------------------------------------------------------+ +--+-----+-------------------------------------------------------------------+ |OK|test#|calc | +--+-----+-------------------------------------------------------------------+ | l|t01 |NONLOCAL chr_tab chr_newline chr_carriagereturn chr_space ; | +--+-----+-------------------------------------------------------------------+ | l|t02 |IF (= o non_whitespace_list@i) THEN first_chr := i ; EXIT ; ENDIF ;| +--+-----+-------------------------------------------------------------------+ | l|t03 |krhello world hhrr | +--+-----+-------------------------------------------------------------------+ | l|t04 | | +--+-----+-------------------------------------------------------------------+ | l|t05 | | +--+-----+-------------------------------------------------------------------+ | l|t06 |end | +--+-----+-------------------------------------------------------------------+ +--+-----+---------------------------------------------------------------------------------------------------- |OK|test#|comments +--+-----+---------------------------------------------------------------------------------------------------- | l|t01 |spaces only (no [tab, \n, \r]s) - [lead, trail, extra] removed as expected +--+-----+---------------------------------------------------------------------------------------------------- | l|t02 |spaces only - check case where no [lead, trail] spaces +--+-----+---------------------------------------------------------------------------------------------------- | l|t03 |as per optr defn, multiple sequential [spc, tab] replaced by single space, except [start, end] of st +--+-----+---------------------------------------------------------------------------------------------------- | l|t04 |null OK - returns null +--+-----+---------------------------------------------------------------------------------------------------- | l|t05 |[space, tab] only becomes null +--+-----+---------------------------------------------------------------------------------------------------- | l|t06 |trivial case - works when there are no [lead, tail] white spaces +--+-----+---------------------------------------------------------------------------------------------------- ~~...~~ -+ | -+ | -+ | -+ r| -+ | -+ | -+ | -+ ~~...~~