turbocommons-ts
Version:
General purpose library that implements frequently used and generic software development tasks
45 lines (44 loc) • 1.97 kB
TypeScript
/**
* TurboCommons is a general purpose and cross-language library that implements frequently used and generic software development tasks.
*
* Website : -> https://turboframework.org/en/libs/turbocommons
* License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License.
* License Url : -> http://www.apache.org/licenses/LICENSE-2.0
* CopyRight : -> Copyright 2015 Edertone Advanded Solutions (08211 Castellar del Vallès, Barcelona). http://www.edertone.com
*/
/**
* The most common conversion utilities to convert the data from a simple type to another one.<br>
* To convert complex classes or structures, use SerializationUtils class.
*
* <pre><code>
* This is a static class, so no instance needs to be created.
* Usage example:
*
* var ns = org_turbocommons_utils;
*
* var result1 = ns.ConversionUtils.stringToBase64('hello');
* var result2 = ns.ConversionUtils.base64ToString('somebase64text');
* ...
* </code></pre>
*/
export declare class ConversionUtils {
/**
* Encode a string to base64 (Which contains only numbers, uppercase, lowercase, forward slash, plus and equal signs)
* Found at: http://www.webtoolkit.info/
* http://www.webtoolkit.info/javascript-base64.html#.VO3gzjSG9AY
*
* @param {string} string The input string to be converted
* @returns {string} The input string as base 64
*/
static stringToBase64(string: string): string;
/**
* Decode a string from base64 (Which contains only numbers, uppercase, lowercase, forward slash, plus and equal signs)
* Found at: http://www.webtoolkit.info/
* http://www.webtoolkit.info/javascript-base64.html#.VO3gzjSG9AY
*
* @param {string} string a base64 string
*
* @returns {string} The base64 decoded as its original string
*/
static base64ToString(string: string): string;
}