Description

Removes characters from a string.

Returns

A copy of the string, with count characters removed from the specified start position. If no characters are found, returns zero.

Category

String functions

Function syntax

RemoveChars(string, start, count)

See also

InsertLen

Parameters

Parameter

Description

string

A string or a variable that contains one. String in which to search.

start

A positive integer or a variable that contains one. Position at which to start search.

count

Number of characters to remove.

Example

<cfscript>
    string="The quick brown fox jumps over the lazy dog."
    start=5
    count=5
    writeOutput(RemoveChars(string,start,count))
</cfscript>

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy