M
Michael 'entropie' Trommer
--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello,
according ti the ruby core docu Kernel#sprintf:
my irb:
irb(main):004:0> sprintf("%2s", "lalaa")
=> "lalaa"
irb(main):005:0> sprintf("%2i", 1212)
=> "1212"
ruby 1.8.3 (2005-09-21) [i686-linux]
What s my mistake?
So long
--
Michael 'entropie' Trommer; http://ackro.org
ruby -e "0.upto((a='njduspAhnbjm/dpn').size-1){|x| a[x]-=1}; p 'mailto:'+a"
--BOKacYhQ+x31HxR3
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDqfJVBBd8ye5RguQRAiXKAJ9KZe96DvU8vH7+sAHZIYP4gUv0xQCcDwij
YuRTSSXU83CxnzSidlAKUYE=
=i78u
-----END PGP SIGNATURE-----
--BOKacYhQ+x31HxR3--
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello,
according ti the ruby core docu Kernel#sprintf:
For string fields, the precision determines the maximum number of
characters to be copied from the string. (Thus, the format sequence
%10.10s will always contribute exactly ten characters to the result.)
my irb:
irb(main):004:0> sprintf("%2s", "lalaa")
=> "lalaa"
irb(main):005:0> sprintf("%2i", 1212)
=> "1212"
ruby 1.8.3 (2005-09-21) [i686-linux]
What s my mistake?
So long
--
Michael 'entropie' Trommer; http://ackro.org
ruby -e "0.upto((a='njduspAhnbjm/dpn').size-1){|x| a[x]-=1}; p 'mailto:'+a"
--BOKacYhQ+x31HxR3
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDqfJVBBd8ye5RguQRAiXKAJ9KZe96DvU8vH7+sAHZIYP4gUv0xQCcDwij
YuRTSSXU83CxnzSidlAKUYE=
=i78u
-----END PGP SIGNATURE-----
--BOKacYhQ+x31HxR3--