filesize
filesize copied to clipboard
Need to parse file size from input string.
Please add functionality to parse file size from the input string. for many applications, the file size limit will be given from the backend and it will be like 1MB or 1GB etc.
So please add functionality to convert a given string into required bytes or kb.
For example, if I need to get '1MB'( string from backend) in bytes, the function would be like,
int sizeInBbytes = fileSize.parse('1MB', outputFormat:bytes);
which outputs 1024