| Anonymous | Login | Signup for a new account | 2013-05-23 01:31 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0003888 | OCaml | OCaml general | public | 2005-11-23 21:17 | 2012-05-07 16:02 | |||||||
| Reporter | mottl | |||||||||||
| Assigned To | lefessan | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | N/A | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.09.0 | |||||||||||
| Target Version | Fixed in Version | 3.13.0+dev | ||||||||||
| Summary | 0003888: Missing "String.unescaped" | |||||||||||
| Description | It is funny that there is a "String.escaped" function but not the inverse "String.unescaped", which makes the escaping function pretty useless. Could you please add this missing function to the String-module? Thanks! Btw., there is a "map"-function in the String-module. Why not expose it in the interface? Best regards, Markus | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0003387) anonymous (viewer) 2005-11-24 11:37 |
I think you're looking for Token.eval_string. (Of course that's not to say that the same function shouldn't be added to the string module... It's highly illogical that it isn't there.) |
|
(0006592) gerd (reporter) 2012-01-04 21:55 |
Funny enough it actually exists in some form: let unescape s = Scanfs.sscanf ("\"" ^ s ^ "\"") "%S" (fun u -> u) So I guess it is only a matter of exporting it. |
|
(0006593) ygrek (reporter) 2012-01-05 08:52 |
shouldn't it be "%S%!" ? |
|
(0006598) gerd (reporter) 2012-01-05 13:24 |
@ygrek: I thought the end of input was already marked enough by the enclosing double quotes. But this can in deed make a difference for recognizing invalid s, e.g. s="\"". So better use your format string. |
|
(0006622) lefessan (developer) 2012-01-08 20:48 |
I have added Scanf.unescaped and String.map in the SVN. I will close this bug report if there is no complain about them. |
|
(0006625) ygrek (reporter) 2012-01-08 23:14 |
I guess it is impossible to put it in String module without creating circular dependency? |
|
(0006628) lefessan (developer) 2012-01-09 10:11 |
Indeed, the other solution would be to re-implement it completely in String, and it is not really worth adding 30 lines of code (1/6 of string.ml) for that, when it is available as one line in Scanf. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-23 21:17 | mottl | New Issue | |
| 2005-11-24 11:37 | anonymous | Note Added: 0003387 | |
| 2005-11-29 13:46 | doligez | Status | new => acknowledged |
| 2011-12-23 14:46 | ygrek | Note Added: 0006516 | |
| 2011-12-23 14:46 | ygrek | Note Deleted: 0006516 | |
| 2012-01-04 21:55 | gerd | Note Added: 0006592 | |
| 2012-01-05 08:52 | ygrek | Note Added: 0006593 | |
| 2012-01-05 13:24 | gerd | Note Added: 0006598 | |
| 2012-01-08 20:48 | lefessan | Note Added: 0006622 | |
| 2012-01-08 23:14 | ygrek | Note Added: 0006625 | |
| 2012-01-09 10:11 | lefessan | Note Added: 0006628 | |
| 2012-01-10 09:48 | lefessan | Status | acknowledged => resolved |
| 2012-01-10 09:48 | lefessan | Fixed in Version | => 3.13.0+dev |
| 2012-01-10 09:48 | lefessan | Resolution | open => fixed |
| 2012-01-10 09:48 | lefessan | Assigned To | => lefessan |
| Copyright © 2000 - 2011 MantisBT Group |