Am Montag, 19. Februar 2018 16:16:14 UTC+1 schrieb Riz: > > > - Performance: To correctly pad, say 00001 or 00019 etc, you need to >
do it like this for example: counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") Example run from webconsole: counter="007" "007" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "008" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "009" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "010" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "011" counter="098" "098" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "099" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "100" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "101" counter="998" "998" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "999" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "1000" counter= ((("10"+counter)*1+1)+"").replace(/^10?/, "") "1001" -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c24ddf35-3fa9-484d-a9fe-ee3888f736b1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.