File segment.icn

Summary

###########################################################################

	File:     segment.icn

	Subject:  Procedures to segment string

	Author:   William H. Mitchell

	Date:     June 10, 1988

###########################################################################

   This file is in the public domain.

###########################################################################
  
     These procedures segment a string s into consecutive substrings
  consisting of characters that respectively do/do not occur in c.
  segment(s,c) generates the substrings, while seglist produces a list
  of the segments.  For example,
  
          segment("Not a sentence.",&letters)
  
  generates
  
          "Not"
          " "
          "a"
          " "
          "sentence"
          "."
  while
          seglist("Not a sentence.",&letters)

  produces

          ["Not"," ","a","sentence","."]

###########################################################################
Procedures:
seglist, segment

This file is part of the (main) package.

Source code.

Details
Procedures:

seglist(s, c)


segment(line, dlms)



This page produced by UniDoc on 2021/04/15 @ 23:59:54.