Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006036OCamlstandard librarypublic2013-06-08 00:422013-06-09 11:07
Assigned To 
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006036: useful string functions not in String module
DescriptionThis commit revert on the current trunk ( [^]) shows that some functions ("split" and "cut_at") are available in the compiler, but not in the standard library.

I often need the "split" function (e.g., to split the content of a small file into a list of lines, or a CLI option into arguments separated by ","). I don't know much about the policy for moving functions to the standard library. What are the reasons behind hidding those?
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
xleroy (administrator)
2013-06-09 11:07

The Str library, part of the core distribution, already provides a "split" function that is much more general than the Misc.split function you're talking about. For instance, the latter is unable to split at whitespace, and does arguably the wrong thing with starting or trailing occurrences of the delimiter. Likewise, Str already contains equivalent functionality to "cut_at".

- Issue History
Date Modified Username Field Change
2013-06-08 00:42 Simon.cruanes New Issue
2013-06-09 11:07 xleroy Note Added: 0009443
2013-06-09 11:07 xleroy Status new => closed
2013-06-09 11:07 xleroy Resolution open => no change required
2017-02-23 16:43 doligez Category OCaml standard library => standard library

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker