/******************************************************************** * @author: Kaven * @email: kaven@wuwenkai.com * @website: http://blog.kaven.xyz * @file: [Kaven-Basic] /src/libs/string/ReplaceAt.ts * @create: 2025-06-25 16:12:45.828 * @modify: 2025-07-11 21:19:12.847 * @version: 6.0.0 * @times: 9 * @lines: 76 * @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. ********************************************************************/ import { StringPosition } from "../class/StringPosition"; /** * Replaces a portion of the input string at the specified index with the given replacement string. * * @param input - The original string to modify. * @param index - The zero-based position in the string where the replacement should begin. * @param replacement - The string to insert at the specified index. * @param length - (Optional) The number of characters to replace starting from the index. If not provided, replaces only one character. * @returns A new string with the specified portion replaced by the replacement string. * * @since 4.0.0 * @version 2025-06-25 */ export declare function ReplaceAt(input: string, index: number, replacement: string, length?: number): string; /** * Replaces a portion of a string at the specified position with a replacement string. * * @param input - The original string to modify. * @param position - The position or range within the string where the replacement should occur. * @param replacement - The string to insert at the specified position. * @returns A new string with the specified portion replaced by the replacement string. * * @since 4.0.0 * @version 2025-06-25 */ export declare function ReplaceAt(input: string, position: StringPosition, replacement: string): string; //# sourceMappingURL=ReplaceAt.d.ts.map