MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / CopyString

Method CopyString

extensions/pgsql/pgsql/PgBasicResults.cpp:198–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198DBResult PgBasicResults::CopyString(unsigned int columnId,
199 char *buffer,
200 size_t maxlength,
201 size_t *written)
202{
203 DBResult res;
204 const char *str;
205 if ((res=GetString(columnId, &str, nullptr)) == DBVal_Error)
206 {
207 return DBVal_Error;
208 }
209
210 size_t wr = strncopy(buffer, str, maxlength);
211 if (written)
212 {
213 *written = wr;
214 }
215
216 return res;
217}
218
219size_t PgBasicResults::GetDataSize(unsigned int columnId)
220{

Callers

nothing calls this directly

Calls 1

strncopyFunction · 0.70

Tested by

no test coverage detected