Update 2.0

Changes to formatting system

Create a formatting struct and then pass it to the
to_text macro or the
to_text_fmt function to format the strings accordingly
Updated docs for the new version
This commit is contained in:
Uttarayan Mondal
2021-03-08 23:40:19 +05:30
parent 89e4ee1442
commit cc82c47628
34 changed files with 932 additions and 392 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
var searchIndex = JSON.parse('{\
"ntext":{"doc":"","i":[[5,"to_text_no_seperator","ntext","Convert u32 to words in a string.",null,[[["u32",15]],["string",3]]],[5,"to_text_with_seperator","","Convert u32 to words in a string seperated by a seperator.",null,[[["u32",15],["str",15]],["string",3]]],[5,"digit_to_text","","Convert digit to words in a string.",null,[[["u8",15]],[["option",4],["string",3]]]],[14,"to_text","","Macro which supports both seperator and without it",null,null]],"p":[]}\
"ntext":{"doc":"Example program with default formatting","i":[[3,"Formatting","ntext","Set the formatting of the output ",null,null],[12,"capitalize","","capitalize the start of the word.",0,null],[12,"digit_seperator","","Set the seperator in between digits like “…",0,null],[12,"place_seperator","","Set the seperator in between words like “three/hundred…",0,null],[12,"tens_seperator","","Set the seperator between tens place digits like “…",0,null],[5,"digit_to_text","","Convert digit to words in a string.",null,[[["bool",15],["u8",15]],[["string",3],["option",4]]]],[5,"to_text_fmt","","Convert usize to words in a string seperated by a …",null,[[["usize",15],["formatting",3]],["string",3]]],[14,"to_text","","Macro which supports both seperator and without it",null,null],[11,"from","","",0,[[]]],[11,"into","","",0,[[]]],[11,"to_owned","","",0,[[]]],[11,"clone_into","","",0,[[]]],[11,"borrow","","",0,[[]]],[11,"borrow_mut","","",0,[[]]],[11,"try_from","","",0,[[],["result",4]]],[11,"try_into","","",0,[[],["result",4]]],[11,"type_id","","",0,[[],["typeid",3]]],[11,"clone","","",0,[[],["formatting",3]]],[11,"default","","Get the default formatting.",0,[[]]],[11,"none","","No formatting at all",0,[[]]],[11,"with_seperator","","With same formatting for all",0,[[["str",15]]]],[11,"capitalize","","Capitalize the formatting",0,[[]]],[11,"decapitalize","","Lower case the formatting struct",0,[[]]]],"p":[[3,"Formatting"]]}\
}');
addSearchOptions(searchIndex);initSearch(searchIndex);