{"id":219,"date":"2007-05-12T17:10:31","date_gmt":"2007-05-12T15:10:31","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/formatting\/"},"modified":"2007-05-12T17:10:32","modified_gmt":"2007-05-12T15:10:32","slug":"formatting","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/formatting\/","title":{"rendered":"Formatting"},"content":{"rendered":"<p>Format(&#8216;%-35s&#8217;,[MyString])<br \/>\n\/\/   Where 35 is the length to make the string<br \/>\n\/\/   And MyString is the string to format<\/p>\n<p>Formatting numbers :<\/p>\n<p>[code lang=&#8221;delphi&#8221;] Var<br \/>\n  I : Integer;<br \/>\n  S : String;<br \/>\nbegin<br \/>\n I := StrToInt(Edit1.Text); \/\/ Get a number<br \/>\n  FmtStr(S, &#8216;%.3d&#8217;, [I]);<br \/>\n Edit2.Text := S; \/\/ write out the string representation of it.<br \/>\n\/\/ I.E. If Edit1.Text := &#8216;1&#8217; Then Edit2.Text := &#8216;001&#8217;;<br \/>\nend;<br \/>\n[\/code]<\/p>\n<p>[tags]Delphi, Strings[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Format(&#8216;%-35s&#8217;,[MyString]) \/\/ Where 35 is the length to make the string \/\/ And MyString is the string to format Formatting numbers : [code&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[75,123],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-3x","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/219"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}