Use the Javascript split or substring functions.
Here s.substring(0,5) should work well (0,5 means: Start at first character, then take 5 characters).
s.substring(0,5)