You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Parameters | Type |
| --- | --- | --- |
| target_size | Number | The desired available size |
Returns
Number
0 on success, -1 on allocation failure
Buf#isBinary SyncExperimental
varresult=buf.isBinary();
Returns
Number
1 if buffer looks like non-text data
Buf#set SyncExperimental
varresult=buf.set(data,datalen);
| Parameters | Type |
| --- | --- | --- |
| data | Buffer | The data to copy into the buffer |
| datalen | Number | The length of the data to copy into the buffer |
Returns
Number
0 on success, -1 on allocation failure
Buf#setString Sync
buf.setString(The);
Sets the content of a GitBuf to a string.
| Parameters | Type |
| --- | --- | --- |
| The | string | utf8 value to set in the buffer. The string will be null terminated. |