[Overview][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'LCLProc' (#lcl)

# DeleteAmpersands

Removes all Ampersand ('&') characters Str, and return the position for the first occurrence.

## Declaration

Source position: lclproc.pas line 132

`function DeleteAmpersands(`
`var Str: string`
`):Integer;`

## Arguments

`Str` |  | String with values converted in the method.

## Function result

Position where the first ampersand character was found.

## Description

DeleteAmpersands is an Integer function used to remove all occurrences of the Ampersand character in Str. The return value contains the position in Str where the first occurrence of the of the character was found.

Double Ampersands (&&) are converted to a single & character in Str.

DeleteAmpersands can be used to remove the prefix used for accelerator keys in button, tool bar, and menu captions.