• Marcel van Lohuizen's avatar
    exp/locale/collate: preparation for adding Search API. Also changed the collate API · f86ae990
    Marcel van Lohuizen authored
    further to how (I believe) it will end up being.
    It is nicer to separate search from sorting functionality. Collation needs tables that
    are not needed by search and vice-versa.  The common functionality is separated out
    in the Weigher interface.  As this interface is very low-level, it will be moved to
    a sub package (colltab) in a next CL.
    The types that will move to this package are Weigher, Elem, and Level.  The addition
    of Elem allows for removing some of the duplicate code between collate and collate/build.
    This CL also introduces some stubs for a higher-level API for options. The default
    proposed options are quite complex and require the user to have a decent understanding
    of Unicode collation.  The new options hide a lot of the complexity.
    
    R=rsc
    CC=golang-dev
    https://golang.org/cl/7058051
    f86ae990
export.go 1017 Bytes