The function extracts the first character of a given string and returns it.

And here is an approximation of the behavior in Python code:
