PHP - possible to calculate number of keystrokes for each character
<p>Is there some kind of function which can calculate how many keystrokes are needed to type a specific character?</p>

<p>For example in french, the character <strong>Ÿ</strong> needs 3 keystrokes to be typed. Right now I'm just checking each character against an array and add the associated value, for <strong>Ÿ</strong> it would be 3.</p>

<p>Is there some way in PHP to automate this or do I have to stick with the array approach?</p>
