MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / SetString

Method SetString

utilities/olcUTIL_DataFile.h:74–80  ·  view source on GitHub ↗

Sets the String Value of a Property (for a given index)

Source from the content-addressed store, hash-verified

72 public:
73 // Sets the String Value of a Property (for a given index)
74 inline void SetString(const std::string& sString, const size_t nItem = 0)
75 {
76 if (nItem >= m_vContent.size())
77 m_vContent.resize(nItem + 1);
78
79 m_vContent[nItem] = sString;
80 }
81
82 // Retrieves the String Value of a Property (for a given index) or ""
83 inline const std::string GetString(const size_t nItem = 0) const

Callers 1

ReadMethod · 0.80

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected