 string but with all contiguous whitespace reduced to a single space and leading whitespace removed</p>
<h2><a class="anchor" id="autotoc_md40"></a>
EXAMPLES</h2>
<pre class="fragment">Sample Program:

 program demo_compact
 use M_strings, only : compact
 implicit none
 ! produces 'This is a test               '
 write(*,*)compact('  This     is      a     test  ')
 ! produces 'Thisisatest                  '
 write(*,*)compact('  This     is      a     test  ',char='')
 ! produces 'This:is:a:test           