FortranStrings.FortranStringType
FortranString{CharType}

Datatype for emulating FORTRAN CHARACTER*N strings.

This type is a wrapper for a Vector with elements of type CharType. Some functions and broadcasting added for limited strings emulation.

Assignment should be done via broadcasting:

julia> s = F8"abc"; s .= "AB" * F"CD"; s
F8"ABC"

julia> s = F"abc"; s[2:end] .= "ABC"; s
F"aAB"

Element-wise assignment is also supported, but it is not FORTRAN alike. Element comparison

julia> s = F8"abc"; s[1:1] == 'a'
true

julia> s = F8"abc"; (s[1:1] == 'a', s[2:2] == "b")
(true, true)

See also @F_str for quoting.

FortranStrings.INDEXMethod
INDEX(STRING, SUBSTRING, BACK=false)

Return the position of the start of the first occurrence of string SUBSTRING as a substring in STRING, counting from one.

If SUBSTRING is not present in STRING, zero is returned. If the BACK argument is present and true, the return value is the start of the last occurrence rather than the first.

FortranStrings.LSAMEMethod
LSAME(s1, s2)

Standard BLAS function to compare first character of two strings, returns bool.

FortranStrings.SCANMethod
SCAN(STRING, CHARSET, BACK=false)

Return the position of the start of the first occurrence of string CHARSET as a CHARSET in STRING, counting from one.

If CHARSET is not present in STRING, zero is returned. If the BACK argument is present and true, the return value is the start of the last occurrence rather than the first.

FortranStrings.TRIMMethod
TRIM(STRING)

Return a truncated copy of the STRING where all trailing spaces are removed.

FortranStrings.@F8_strMacro
F8"some string"

String macro for compatible with FORTRAN strings FortranString{UInt8}.

The 'd' and "qq" flag can be used to emulate behaviour fortran strings in double quotes, where the double quotes inside such strings must be doubled:

F8"Use \"\"doubled\"\""qq

The 'q' flag indicates the emulation of Fortran strings in single quotes:

F8"Can''t be with only single quote inside"q
FortranStrings.@F_strMacro
F"some string"

String macro for FortranString{Char}("some string").

The 'd' and "qq" flag can be used to emulate behaviour fortran strings in double quotes, where the double quotes inside such strings must be doubled:

F8"Use \"\"doubled\"\""qq

The 'q' flag indicates the emulation of Fortran strings in single quotes:

F8"Can''t be with only single quote inside"q