Converting single character string to integer

I want to convert a single character string to an integer, but if I have a letter I only get zero as the result.

Initials[2].toInt()
is fine with numbers but not letters.

There are plenty of examples when using arrays of characters but I need a single character string. The 'atoi' method needs a character string.

First of all, show us the "Initials" variable definition, without it I can't show you specific examples.

Anyway, we also need to know what you mean with "single character to an integer". Which "character" and what does it represente for you? Is it a single digit like '2' or '3' or a binary value (e.g. from 0 to 255)?
Example, if it's a single digit you could do this:

  // '0' ASCII value is 48, so this way you get the corresponding integer value
  byte digit = Initials[2] - '0'; 

Tell me more to let me better help you.

That will only work with the numeric characters, so no different then the result of toInt().

What do you really need? Generally integers are not represented by any character other than the numbers 0 to 9, unless you specify a different base such as hexidecimal.

i often process single character cmds prefixed with numeric a argument

    static int  val = 0;

    if (Serial.available()) {
        int c = Serial.read ();

        switch (c)  {
        case '0'...'9':
            val = c - '0' + (10 * val);
            break;

        case 'A':
            analogPin = val;
            Serial.print   ("analogPin = ");
            Serial.println (val);
            val = 0;
            break;

        case 'D':
            debug ^= 1;
            break;

They are just string variables and one character each.

It is not to be processed as an array.

String Initials[3];

I need to allow alphabetic characters so using cases would be very time consuming.

I meant the ascii value. These values are integer and string at different times.

When?

Sorry, I'm still a bit confused about your requirement.
I see an array of 3 String elements here, so please give me an example of the possible values ​​you have for "Initials" and what you intend to obtain with them, and then we'll see...

Alphabetic, lower and upper case. Ascii values corresponding to them

I'm just missing the ability to get the ascii values for letters.

If you can provide an example, as I asked, of the strings or characters you have in that array and what you want to get, I can try to help. If you're so vague, you'll only get vague answers.
So since it doesn't seem like a complicated question, I'll ask again: can you show an example of what you have in the array and what you want to get from each element?

  Serial.print('a', HEX);
  Serial.print('a', DEC);
  Serial.print('a' == 97); // true

A character is also an integer. The ASCII value of A is 65. Having single-character String objects just wastes memory, and makes your life complicated

void setup() {
  Serial.begin(115200);
  String x{ "A" };
  Serial.println(static_cast<unsigned char>(x.charAt(0)));
}

void loop() {}

1. Example of a single character:

char ch = 'A';    //tehre is no null-charcater ('\0' =0x00) at the end

2. Example of a muli characters c-string:

char myMsg1[] = "Hello";   //at the end there is a null-character ('\0' = 0x00)

3. Example of a single character c-string:

char myMsg2[] = "B";   

4. Example of multi character String-sring:

String mySyting1 = "Arduino";
String myString2 = "1234";
String myString3 = "Arduino, 1234, Forum, A");

toInt() method is applicable only on String-type numeric string ("1234"). You cannot apply it on String-type character string ("Arduino").

I agree 100%. But unless the post author can demonstrate their goals, possibly with an example, I think it's best to avoid filling the discussion with general principles (even if they're absolutely correct!).
The OP should do their part and make an effort to better describe what they have and what they want to achieve. I'd avoid giving further answers before this.

When these occur in the program as single text strings, I need to get their ascii value.

That is all this is about and nothing else needs to be specified in this post.

1
In C++ language when it is said charcater, I understand one of the following what is called a Character Set:
A to Z
a to z
0 to 9
Punctuation marks
`Any prinable control characters'

2.
In C++ language when it is said integer, I understand one of the following:
0, 1, .......................... all interger numbers that memory can hold

3.
During runtime, all symbols are stored as numerical numbers (0 and 1) inside computer memory and register. That's why the alphabets of the Character Set are assigned numerical values like: 0101 0001 (0x41) for A and so on...

4.
So, a character is not an integer; but, it has an integer value. The declarations are also different:

char ch = 'A`;      //ch olds a character which has an integer value of 0x41
byte data = 0x41;      //data holds an integer value

5.

Serial.print(ch);     //shows A
Serial.print(data); //shows: 65

And another way to see the value of a single character... Serial.write();

  Serial.write('A'); // shows 65

A char is already the ascii value, but it is interpreted differently by some functions.

void setup() {
  Serial.begin(9600);
  for (char ch = ' '; ch <= '~'; ch++) {
    int num = ch;
    Serial.print(ch);
    Serial.print("  ");
    Serial.println(num);
  }
}

void loop() {
}

If you want just the single character in a char array, then just index to element 0.

and the ascii values I get from the string data are not for printing but for use in integer form.

In case anyone is reading who has an answer other than switch/case