You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, std.conv.parse!(string, string) expects the string to be in the form of an array of chars:
//----
import std.conv;
void main()
{
string s1 = `[['h', 'e', 'l', 'l', 'o'], ['w', 'o', 'r', 'l', 'd']]`;
string s2 = `["hello", "world"]`;
string s3 = `['h', 'e', 'l', 'l', 'o']`;
string s4 = `"hello"`;
auto ss1 = parse!(string[])(s1);
auto ss2 = parse!(string[])(s2);
auto ss3 = parse!(string )(s3);
auto ss4 = parse!(string )(s4); //Can't parse string: "[" is missing
return;
}
//----
The irony though is that if you place the string inside an array (s1 and s2), then conv will actually support both forms of parse.
The text was updated successfully, but these errors were encountered:
monarchdodra reported this on 2013-02-27T03:52:47Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=9605
CC List
Description
Basically, std.conv.parse!(string, string) expects the string to be in the form of an array of chars: //---- import std.conv; void main() { string s1 = `[['h', 'e', 'l', 'l', 'o'], ['w', 'o', 'r', 'l', 'd']]`; string s2 = `["hello", "world"]`; string s3 = `['h', 'e', 'l', 'l', 'o']`; string s4 = `"hello"`; auto ss1 = parse!(string[])(s1); auto ss2 = parse!(string[])(s2); auto ss3 = parse!(string )(s3); auto ss4 = parse!(string )(s4); //Can't parse string: "[" is missing return; } //---- The irony though is that if you place the string inside an array (s1 and s2), then conv will actually support both forms of parse.The text was updated successfully, but these errors were encountered: