/******************************************************************** * @author: Kaven * @email: kaven@wuwenkai.com * @website: http://blog.kaven.xyz * @file: [Kaven-Basic] /src/libs/string/UTF8Encode.ts * @create: 2025-06-25 17:56:13.870 * @modify: 2025-07-11 21:19:12.840 * @version: 6.0.0 * @times: 10 * @lines: 97 * @copyright: Copyright © 2018-2025 Kaven. All Rights Reserved. * @description: [description] * @license: * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ********************************************************************/ /** * Encodes a given string into its UTF-8 byte representation and returns a string * where each character corresponds to a byte of the UTF-8 encoding. * * @param str - The input string to encode. * @returns A string where each character represents a byte of the UTF-8 encoded input. * * @remarks * This function is useful for scenarios where you need a string representation * of the UTF-8 bytes of the original string, such as for binary-safe storage or transmission. * * @example * ```typescript * const encoded = UTF8Encode("hello"); * // encoded will be a string of characters representing the UTF-8 bytes of "hello" * ``` * * @since 4.0.0 * @version 2021-12-14 */ export declare function UTF8Encode(str: string): string; //# sourceMappingURL=UTF8Encode.d.ts.map