MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / get_string

Function get_string

plugin/seq/plotPDF.cpp:798–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796
797 return;
798}
799
800std::string get_string(Stack stack, Expression e, const char *const DEFAULT)
801{
802 const size_t length = 128;
803 char *const carg = new char [ length ];
804
805 if( !e )
806 strcpy(carg, DEFAULT);
807 else
808 strncpy(carg, GetAny<string*>((*e)(stack))->c_str(), length);
809
810 return std::string( carg );
811}
812

Callers 1

operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected