FLANG
Fortran::evaluate::value::Character< KIND > Class Template Reference

Simple wrapper around a std::string/std:u16string/std::u32string. More...

#include <flang/Evaluate/char.h>

Public Member Functions

 Character (const Character &v)
 Character (Character &&v)
Characteroperator= (const Character &v)
Characteroperator= (Character &&v)
 Character (const Word &v)
 Character (Word &&v)
Characteroperator= (const Word &v)
Characteroperator= (Word &&v)
auto size () const
 Returns the number of characters stored; not the number of bytes.
void StoreRawBytes (void *dst, std::size_t size, bool *changed=nullptr)

Static Public Member Functions

static Word FromRawBytes (const void *raw, std::size_t size)

Detailed Description

template<int KIND>
class Fortran::evaluate::value::Character< KIND >

Simple wrapper around a std::string/std:u16string/std::u32string.

Member Function Documentation

◆ FromRawBytes()

template<int KIND>
Word Fortran::evaluate::value::Character< KIND >::FromRawBytes ( const void * raw,
std::size_t size )
inlinestatic

Reads a string of characters from raw. is the number of bytes to read; must be a multiple of the size of a single character.

◆ StoreRawBytes()

template<int KIND>
void Fortran::evaluate::value::Character< KIND >::StoreRawBytes ( void * dst,
std::size_t size,
bool * changed = nullptr )
inline

Writes a string of characters to dst. \o is the the number of bytes to be written; must be a multiple of the size of a single character. If the string is smaller that size, the rest of the memory padded with spaces. If the string is shorter than size, only the first characters are written. If changes points to bool, it will be set to true if any bytes at dst have changed.


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