howsmydriving-utils
Version:
Utilities used by howsmydriving package any howsmydriving-[region] plug-in modules.
29 lines (28 loc) • 978 B
TypeScript
import './extend/string-ext';
/**
* Compares two strings that represent numbers. Comparing as strings
* will return inconsistent results if the numbers have different number
* of digits.
*
* Params:
* a: fist string
* b: second string
* Returns:
* 0 - a and b are numberically equal (may not be string equal though)
* < 0 - a < b (a is numerically less than b)
* > 0 - a > b (a is numerically greater than b)
**/
export declare function CompareNumericStrings(a: string, b: string): number;
/**
* Recursively dumps any javascript object.
*
* Params:
* o: Object to dump
* Indent: # characters to indent. This allows creating an intented
* tree structure of an obect.
*
* Returns:
* String representing a dump of o and all it's values.
*/
export declare function DumpObject(o: any, levels?: number, indent?: number): string;
export declare function SplitLongLines(source_lines: Array<string>, maxLen: number): Array<string>;