Skip to content

Commit dd05232

Browse files
authored
Merge pull request #5121 from JackStouffer/parse-docs
Improved docs for AA overload of std.conv.parse
2 parents fd014e8 + 0e1e860 commit dd05232

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

std/conv.d

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3613,6 +3613,16 @@ Lfewerr:
36133613
* Parses an associative array from a string given the left bracket (default $(D
36143614
* '[')), right bracket (default $(D ']')), key-value separator (default $(D
36153615
* ':')), and element seprator (by default $(D ',')).
3616+
*
3617+
* Params:
3618+
* s = the string to parse
3619+
* lbracket = the character that starts the associative array
3620+
* rbracket = the character that ends the associative array
3621+
* keyval = the character that associates the key with the value
3622+
* comma = the character that separates the elements of the associative array
3623+
*
3624+
* Returns:
3625+
* An associative array of type `Target`
36163626
*/
36173627
Target parse(Target, Source)(ref Source s, dchar lbracket = '[',
36183628
dchar rbracket = ']', dchar keyval = ':', dchar comma = ',')
@@ -3652,6 +3662,7 @@ Target parse(Target, Source)(ref Source s, dchar lbracket = '[',
36523662
return result;
36533663
}
36543664

3665+
///
36553666
@safe pure unittest
36563667
{
36573668
auto s1 = "[1:10, 2:20, 3:30]";

0 commit comments

Comments
 (0)