The following functions determine the word breaks in a string.
Determines the word break points in s, an array of n units, and stores the result at p
[0..n-1].p
- p
[i] = 1- means that there is a word boundary between s
[i-1]and s[i].- p
[i] = 0- means that s
[i-1]and s[i]must not be separated.[0]is always set to 0. If an application wants to consider a word break to be present at the beginning of the string (before s[0]) or at the end of the string (after s[0..n-1]), it has to treat these cases explicitly.