We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1d8a32 commit d6dc94fCopy full SHA for d6dc94f
src/types/TString.hpp
@@ -82,6 +82,15 @@ namespace tklb {
82
for(; i < N; i++) { mData[i] = Terminator; }
83
mData[N - 1] = Terminator; // just in case, will run over the last char
84
}
85
+
86
+ void put(char* str, Size length) const {
87
+ if (N == 0) { return; }
88
+ for (Size i = 0; i < (min(N, length)); i++) {
89
+ str[i] = mData[i];
90
+ }
91
+ auto end = min(N, length - 1);
92
+ str[end] = Terminator;
93
94
};
95
96
/**
0 commit comments