FLASH-X
Doxygen Generated Documentation From Interface Source Code
Functions/Subroutines
removeNullChar.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine removeNullChar (str1)
 

Function/Subroutine Documentation

◆ removeNullChar()

subroutine removeNullChar ( character(len=*), intent(inout)  str1)

This is a small little routine that takes a string and looks for null chars at the end. If it finds one it replaces it with a blank character. Additionally, if one NullChar is found, any following chars are set to a blank char. This routine is necessary because fortran and C handle strings differently. C attaches the null character to the end of strings. Since most of our work is done in fortran this rarely matters, but in the case of I/O particularly reading in data from a checkpoint file. C strings can be different from Fortran strings

str1 - string with null chars returned with null chars removed

Definition at line 37 of file removeNullChar.F90.