I am receiving a string from the YouTube JSONC api, but the duration is coming as a full number i.e 2321 instead of 23:21 or 2 instead of 0:02. How would I go about fixing t
You can subString the 2321 and get the first string as 23 and the second as 21 and convert them to int. Also check for the length of the text:
subString
2321
int
if (text.length < 4) //add zeros on the left of String until be of length 4