FMS 2025.01-dev
Flexible Modeling System
Loading...
Searching...
No Matches
fms_c2f_string Interface Reference

Converts a C string to a Fortran string. More...

Public Member Functions

character(len=:) function, allocatable cpointer_fortran_conversion (cstring)
 Converts a C-string returned from a TYPE(C_PTR) function to a fortran string with type character.
 
character(len=:) function, allocatable cstring_fortran_conversion (cstring)
 Converts a C-string to a pointer and then to a Fortran string.
 

Detailed Description

Converts a C string to a Fortran string.

Definition at line 112 of file fms_string_utils.F90.

Member Function/Subroutine Documentation

◆ cpointer_fortran_conversion()

character(len=:) function, allocatable cpointer_fortran_conversion ( type (c_ptr), intent(in)  cstring)

Converts a C-string returned from a TYPE(C_PTR) function to a fortran string with type character.

Parameters
[in]cstringInput C-pointer
Returns
The fortran string returned

Definition at line 208 of file fms_string_utils.F90.

◆ cstring_fortran_conversion()

character(len=:) function, allocatable cstring_fortran_conversion ( character (kind=c_char), dimension (*), intent(in)  cstring)

Converts a C-string to a pointer and then to a Fortran string.

Parameters
[in]cstringInput C-string
Returns
The fortran string returned

Definition at line 200 of file fms_string_utils.F90.


The documentation for this interface was generated from the following file: