We have a string (0 .. N simbols long). How to find out if its first simbol is "_" and if true remove it and make first letter capital (fro example "_distance" => "Distance")?
I wondered in general – so stupid I am, while I was investigating creation of Unity3d CustomEditor Components visiable to Inspector. So idea was – if class feild starts with _ do parsing etc.
But it appeares that in Unity3d for private class fields which are usually written like _name when you flag it with something like [SerializeField] inspector will do such thing automatically.
Very trivial, actually:
Reads almost the same as your description, actually. And it will fail if N is less than 2. But you can check for that separately, e.g.: