UNPKG

botbuilder-core

Version:

Core components for Microsoft Bot Builder. Components in this library can run either in a browser or on the server.

40 lines 1.23 kB
/** * @module botbuilder */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ /** * Helper class containing string utility methods. */ export declare class StringUtils { /** * Truncate string with ... * * @param text Text. * @param length Length to truncate text. * @returns Original string modified. */ static ellipsis(text: string, length: number): string; /** * UniqueHash - create a unique hash from a string. * * @remarks * The source for this function was derived from the following article: * * https://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/ * @param text Text to hash. * @returns A string which is an unique hash. */ static hash(text: string): string; /** * EllipsisHash - create truncated string with unique hash for the truncated part. * * @param text Text to truncate. * @param length Length to truncate at. * @returns The truncated string with unique hash for the truncated part. */ static ellipsisHash(text: string, length: number): string; } //# sourceMappingURL=stringUtils.d.ts.map