Fortran SFF API to data I/O streams in C++

◆ fillfstring()

void fapidxx::fillfstring ( const std::string &  s,
char *  fstring,
ftnlen  slen 
)

fill a Fortran string with a C++ string

Definition at line 60 of file helper.cc.

Referenced by fapidxx::WID2container::encodeascii(), freeblock(), sff_helper_decode_wid2__(), sff_ropen__(), sff_ropenfs__(), sff_ropens__(), sff_rtrace__(), sff_rtracefi__(), sff_rtracei__(), and sff_skipdata__().

61  {
62  std::string::const_iterator is=s.begin();
63  char *op=fstring;
64  for (int i=0; i<slen; ++i)
65  {
66  if (i<int(s.size()))
67  {
68  *op=*is;
69  }
70  else
71  {
72  *op=' ';
73  }
74  ++op;
75  ++is;
76  }
77  } // void fillfstring(const std::string& s, char *fstring, ftnlen slen)
Here is the caller graph for this function: