Code

Contents

Description

This function is used to return a numeric code for the first character in input string.

Syntax

 int Code(string str)

Parameters

str

is the string that you want to know the numeric code. If the string is empty, return 0.

Return

Return a numeric code.

Example

int dd=code(abc);
dd=; //Should return 65 here, the numeric code of 'A'

See Also

Char