1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
Daniel Neto 2023-06-30 09:56:13 -03:00
parent 37e90e3dfe
commit 214f5d9fc3
4949 changed files with 1393320 additions and 29 deletions

20
node_modules/mux.js/lib/utils/string.js generated vendored Normal file
View file

@ -0,0 +1,20 @@
/**
* Returns the first string in the data array ending with a null char '\0'
* @param {UInt8} data
* @returns the string with the null char
*/
var uint8ToCString = function(data) {
var index = 0;
var curChar = String.fromCharCode(data[index]);
var retString = '';
while (curChar !== '\0') {
retString += curChar;
index++;
curChar = String.fromCharCode(data[index]);
}
// Add nullChar
retString += curChar;
return retString;
};
module.exports = { uint8ToCString };