Is there any way to determine a string's encoding in Matlab?
Say, I have an encoded string, but I don't know if it is encoded in Base16, Base32 or Base64 encoding, how do I find out?
This is what I need but in c#
public static bool IsBase64(string base64String)
{
if (base64String.Replace(" ", "").Length % 4 != 0)
{
return false;
}
try
{
Convert.FromBase64String(base64String);
return true;
}
catch (FormatException exception)
{
// Handle the exception
}
return false;
}
Is there any way to do that in Matlab?