Is there a build-in function in solidity allows to specify a letter in a string at given position like a = string b[i], where i indicates the position of that letter?
Strings aren't currently index-accessible.
From the Solidity docs:
Variables of type bytes and string are special arrays. A bytes is similar to byte, but it is packed tightly in calldata. string is equal to bytes but does not allow length or index access (for now).
bytes instead, though note:
If you want to access the byte-representation of a string s, use bytes(s).length / bytes(s) = ‘x’;. Keep in mind that you are accessing the low-level bytes of the utf-8 representation, and not the individual characters!