In string-net theory, the density of the (oriented) string is a vector field →E. If string are all closed strings with no end, then →∂⋅→E=0. So the ends of the string are the source of →E, and correspond to the charge. The ends of strings are always discrete, impying that the charge is quantized. i.e. one end = charge-1.