2020< title > bitarray/utils</ title >
2121< link rel ="stylesheet " type ="text/css " href ="../nimdoc.out.css ">
2222
23- < script type ="text/javascript " src ="dochack.js "> </ script >
23+ < script type ="text/javascript " src ="../ dochack.js "> </ script >
2424
2525< script type ="text/javascript ">
2626function main ( ) {
4747
4848 toggleSwitch . addEventListener ( 'change' , switchTheme , false ) ;
4949
50+ const currentTheme = localStorage . getItem ( 'theme' ) ? localStorage . getItem ( 'theme' ) : null ;
51+ if ( currentTheme ) {
52+ document . documentElement . setAttribute ( 'data-theme' , currentTheme ) ;
5053
51- if ( window . matchMedia && window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ) {
52- document . documentElement . setAttribute ( 'data-theme' , "dark" ) ;
53- toggleSwitch . checked = true ;
54- } else if ( window . matchMedia && window . matchMedia ( '(prefers-color-scheme: light)' ) . matches ) {
55- document . documentElement . setAttribute ( 'data-theme' , "light" ) ;
56- toggleSwitch . checked = false ;
57- } else {
58- const currentTheme = localStorage . getItem ( 'theme' ) ? localStorage . getItem ( 'theme' ) : null ;
59- if ( currentTheme ) {
60- document . documentElement . setAttribute ( 'data-theme' , currentTheme ) ;
61-
62- if ( currentTheme === 'dark' ) {
63- toggleSwitch . checked = true ;
64- }
54+ if ( currentTheme === 'dark' ) {
55+ toggleSwitch . checked = true ;
6556 }
6657 }
6758}
@@ -83,6 +74,9 @@ <h1 class="title">bitarray/utils</h1>
8374 </ div >
8475 < div id ="global-links ">
8576 < ul class ="simple ">
77+ < li >
78+ < a href ="../theindex.html "> Index</ a >
79+ </ li >
8680 </ ul >
8781 </ div >
8882 < div id ="searchInputDiv ">
@@ -101,33 +95,38 @@ <h1 class="title">bitarray/utils</h1>
10195 < a class ="reference reference-toplevel " href ="#7 " id ="57 "> Types</ a >
10296 < ul class ="simple simple-toc-section ">
10397 < li > < a class ="reference " href ="#BlockInt "
104- title ="BlockInt = uint64 "> < wbr /> Block < wbr /> Int < span class =" attachedType " > </ span > </ a > </ li >
98+ title ="BlockInt = uint64 "> BlockInt </ a > </ li >
10599
106100 </ ul >
107101</ li >
108102< li >
109103 < a class ="reference reference-toplevel " href ="#8 " id ="58 "> Vars</ a >
110104 < ul class ="simple simple-toc-section ">
111105 < li > < a class ="reference " href ="#BLOCK_HEADS_BITS "
112- title ="BLOCK_HEADS_BITS = newSeq(65) "> < wbr /> BLOCK_ < wbr /> HEADS_ < wbr /> BITS < span class =" attachedType " > </ span > </ a > </ li >
106+ title ="BLOCK_HEADS_BITS = newSeq(65) "> BLOCK_HEADS_BITS </ a > </ li >
113107 < li > < a class ="reference " href ="#BLOCK_TAILS_BITS "
114- title ="BLOCK_TAILS_BITS = newSeq(65) "> < wbr /> BLOCK_ < wbr /> TAILS_ < wbr /> BITS < span class =" attachedType " > </ span > </ a > </ li >
108+ title ="BLOCK_TAILS_BITS = newSeq(65) "> BLOCK_TAILS_BITS </ a > </ li >
115109
116110 </ ul >
117111</ li >
118112< li >
119113 < a class ="reference reference-toplevel " href ="#10 " id ="60 "> Consts</ a >
120114 < ul class ="simple simple-toc-section ">
121- < li > < a class ="reference " href ="#BLOCK_LEN "
122- title ="BLOCK_LEN = 64 "> < wbr /> BLOCK_< wbr /> LEN< span class ="attachedType "> </ span > </ a > </ li >
115+ < li > < a class ="reference " href ="#BLOCK_LEN_POWER_2 "
116+ title ="BLOCK_LEN_POWER_2 = 6 "> BLOCK_LEN_POWER_2</ a > </ li >
117+ < li > < a class ="reference " href ="#BLOCK_LEN "
118+ title ="BLOCK_LEN = 64 "> BLOCK_LEN</ a > </ li >
123119
124120 </ ul >
125121</ li >
126122< li >
127123 < a class ="reference reference-toplevel " href ="#12 " id ="62 "> Procs</ a >
128124 < ul class ="simple simple-toc-section ">
125+ < ul class ="simple nested-toc-section "> toBin
129126 < li > < a class ="reference " href ="#toBin%2CBlockInt%2CPositive "
130- title ="toBin(x: BlockInt; len: Positive): string "> < wbr /> to< wbr /> Bin< span class ="attachedType "> BlockInt</ span > </ a > </ li >
127+ title ="toBin(x: BlockInt; len: Positive): string "> toBin,< wbr > BlockInt,< wbr > Positive</ a > </ li >
128+
129+ </ ul >
131130
132131 </ ul >
133132</ li >
@@ -154,6 +153,10 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
154153< dd >
155154
156155
156+ < a
157+ href ="https://www.github.com/yesdrx/bitarray/tree/version-1-4/src/bitarray/utils.nim#L8 "
158+ class ="link-seesrc " target ="_blank "> Source</ a >
159+ < a href ="https://www.github.com/yesdrx/bitarray/edit/devel/src/bitarray/utils.nim#L8 " class ="link-seesrc " target ="_blank " > Edit</ a >
157160
158161</ dd >
159162
@@ -166,25 +169,48 @@ <h1><a class="toc-backref" href="#8">Vars</a></h1>
166169< dd >
167170
168171
172+ < a
173+ href ="https://www.github.com/yesdrx/bitarray/tree/version-1-4/src/bitarray/utils.nim#L37 "
174+ class ="link-seesrc " target ="_blank "> Source</ a >
175+ < a href ="https://www.github.com/yesdrx/bitarray/edit/devel/src/bitarray/utils.nim#L37 " class ="link-seesrc " target ="_blank " > Edit</ a >
169176
170177</ dd >
171178< a id ="BLOCK_TAILS_BITS "> </ a >
172179< dt > < pre > < a href ="utils.html#BLOCK_TAILS_BITS "> < span class ="Identifier "> BLOCK_TAILS_BITS</ span > </ a > < span class ="Other "> =</ span > < span class ="Identifier "> newSeq</ span > < span class ="Other "> (</ span > < span class ="DecNumber "> 65</ span > < span class ="Other "> )</ span > </ pre > </ dt >
173180< dd >
174181
175182
183+ < a
184+ href ="https://www.github.com/yesdrx/bitarray/tree/version-1-4/src/bitarray/utils.nim#L38 "
185+ class ="link-seesrc " target ="_blank "> Source</ a >
186+ < a href ="https://www.github.com/yesdrx/bitarray/edit/devel/src/bitarray/utils.nim#L38 " class ="link-seesrc " target ="_blank " > Edit</ a >
176187
177188</ dd >
178189
179190</ dl > </ div >
180191< div class ="section " id ="10 ">
181192< h1 > < a class ="toc-backref " href ="#10 "> Consts</ a > </ h1 >
182193< dl class ="item ">
194+ < a id ="BLOCK_LEN_POWER_2 "> </ a >
195+ < dt > < pre > < a href ="utils.html#BLOCK_LEN_POWER_2 "> < span class ="Identifier "> BLOCK_LEN_POWER_2</ span > </ a > < span class ="Other "> =</ span > < span class ="DecNumber "> 6</ span > </ pre > </ dt >
196+ < dd >
197+
198+
199+ < a
200+ href ="https://www.github.com/yesdrx/bitarray/tree/version-1-4/src/bitarray/utils.nim#L9 "
201+ class ="link-seesrc " target ="_blank "> Source</ a >
202+ < a href ="https://www.github.com/yesdrx/bitarray/edit/devel/src/bitarray/utils.nim#L9 " class ="link-seesrc " target ="_blank " > Edit</ a >
203+
204+ </ dd >
183205< a id ="BLOCK_LEN "> </ a >
184206< dt > < pre > < a href ="utils.html#BLOCK_LEN "> < span class ="Identifier "> BLOCK_LEN</ span > </ a > < span class ="Other "> =</ span > < span class ="DecNumber "> 64</ span > </ pre > </ dt >
185207< dd >
186208
187209
210+ < a
211+ href ="https://www.github.com/yesdrx/bitarray/tree/version-1-4/src/bitarray/utils.nim#L34 "
212+ class ="link-seesrc " target ="_blank "> Source</ a >
213+ < a href ="https://www.github.com/yesdrx/bitarray/edit/devel/src/bitarray/utils.nim#L34 " class ="link-seesrc " target ="_blank " > Edit</ a >
188214
189215</ dd >
190216
@@ -193,12 +219,17 @@ <h1><a class="toc-backref" href="#10">Consts</a></h1>
193219< h1 > < a class ="toc-backref " href ="#12 "> Procs</ a > </ h1 >
194220< dl class ="item ">
195221< a id ="toBin,BlockInt,Positive "> </ a >
196- < dt > < pre > < span class ="Keyword "> proc</ span > < a href ="#toBin%2CBlockInt%2CPositive "> < span class ="Identifier "> toBin</ span > </ a > < span class ="Other "> (</ span > < span class ="Identifier "> x</ span > < span class ="Other "> :</ span > < a href ="utils.html#BlockInt "> < span class ="Identifier "> BlockInt</ span > </ a > < span class ="Other "> ;</ span > < span class ="Identifier "> len</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Positive</ span > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma "> < span class ="Identifier "> noSideEffect</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> raises</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> tags</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
222+ < dt > < pre > < span class ="Keyword "> proc</ span > < a href ="#toBin%2CBlockInt%2CPositive "> < span class ="Identifier "> toBin</ span > </ a > < span class ="Other "> (</ span > < span class ="Identifier "> x</ span > < span class ="Other "> :</ span > < a href ="utils.html#BlockInt "> < span class ="Identifier "> BlockInt</ span > </ a > < span class ="Other "> ;</ span > < span class ="Identifier "> len</ span > < span class ="Other "> :</ span > < span class ="Identifier "> Positive</ span > < span class ="Other "> )</ span > < span class ="Other "> :</ span > < span class ="Identifier "> string</ span > < span > < span class ="Other "> {</ span > < span class ="Other pragmadots "> ...</ span > < span class ="Other "> }</ span > </ span > < span class ="pragmawrap "> < span class ="Other "> {.</ span > < span class ="pragma "> < span class ="Identifier "> noSideEffect</ span > < span class ="Other "> ,</ span > < span class ="Identifier "> raises</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > < span class ="Other "> ,</ span >
223+ < span class ="Identifier "> tags</ span > < span class ="Other "> :</ span > < span class ="Other "> [</ span > < span class ="Other "> ]</ span > </ span > < span class ="Other "> .}</ span > </ span > </ pre > </ dt >
197224< dd >
198225
199226< p > Converts < tt class ="docutils literal "> < span class ="pre "> x</ span > </ tt > (BlockInt) into its binary representation.</ p >
200227< p > The resulting string is always < tt class ="docutils literal "> < span class ="pre "> len</ span > </ tt > characters long. No leading < tt class ="docutils literal "> < span class ="pre "> 0b</ span > </ tt > prefix is generated. </ p >
201228
229+ < a
230+ href ="https://www.github.com/yesdrx/bitarray/tree/version-1-4/src/bitarray/utils.nim#L45 "
231+ class ="link-seesrc " target ="_blank "> Source</ a >
232+ < a href ="https://www.github.com/yesdrx/bitarray/edit/devel/src/bitarray/utils.nim#L45 " class ="link-seesrc " target ="_blank " > Edit</ a >
202233
203234</ dd >
204235
@@ -211,7 +242,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
211242 < div class ="twelve-columns footer ">
212243 < span class ="nim-sprite "> </ span >
213244 < br />
214- < small style ="color: var(--hint); "> Made with Nim. Generated: 2020 -08-09 21:07:34 UTC</ small >
245+ < small style ="color: var(--hint); "> Made with Nim. Generated: 2021 -08-31 02:17:22 UTC</ small >
215246 </ div >
216247 </ div >
217248 </ div >
0 commit comments