C Library Functions - nospace (3)
NAME
nospace(3f) - [M_strings:WHITESPACE] remove all whitespace from
input string
(LICENSE:PD)
CONTENTS
Synopsis
Description
Examples
Author
License
SYNOPSIS
function nospace(str) - remove all whitespace from input string
character(len=*),intent(in) :: str
character(len=:),allocatable :: nospace
DESCRIPTION
nospace(3f) removes space, tab, carriage return, new line, vertical
tab, formfeed and null characters (called "whitespace"). The output
is returned trimmed.
EXAMPLES
Sample program:
program demo_nospace
use M_strings, only: nospace
implicit none
character(len=:),allocatable :: s
s= This is a test
write(*,*) original input string is ....,s
write(*,*) processed output string is ...,nospace(s)
if(nospace(s) == Thisisatest)then
write(*,*)nospace test passed
else
write(*,*)nospace test error
endif
end program demo_nospace
Expected output
original input string is .... This is a test
processed output string is ...Thisisatest
nospace test passed
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | nospace (3) | June 29, 2025 |
Generated by manServer 1.08 from 8fdf9d6c-0dce-4cc9-9f44-7ba9f16b3a84 using man macros.