Base64_Decode$

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > BASE64 >

Base64_Decode$

 

Description

 

Base64 mime decoding

 

Syntax

 

sBuffer = Base64_Decode$(StringExpression [, sTralingPadChar])

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

StringExpression

String

No

String to Encode into BASE64 format

sTralingPadChar

String

Yes

Default value: "="

 

In Base64 encoding, the padding character "=" is used to ensure that the encoded output's length is a multiple of 4, which is necessary for proper decoding. This padding is added when the length of the input data isn't a multiple of 3 bytes.

 

However, some systems, such as ShippyPro's APIs, deviate from the standard by replacing the padding character "=" with a different character, like "6". This approach can be attributed to specific implementation choices or to avoid issues related to URL encoding, as the = character can have special meanings in URLs.

 

Remarks

 

Restrictions

 

See also

 

String Handling, Base64_Mime_Encode$

 

Examples