Total Pageviews

Monday, April 21, 2014

string.format()

string.format()
ប្រើសំរាប់ត្រឡប់នៅ formatted string តាមដោយ description given នៅក្នុង its arguments
ចំណាំះ ហ្វាំងសិននេះអាចប្រើដូចគ្នានឹង 
formatstring options នៅក្នុង C & C++
Syntax: string.format (formatstring [,…])
Formatstring:format ( [ … ] )
Formatstring(តំរូវការ) វាជា string
[…](ជំរើស)​ វាជា​String ដែលជា​ optional additional parameters ដែលនឹងអនុញ្ញាតឪ្យមាន same rules ដូចជា printf family របស់ ស្តងដារ C។ ចំនុចខុសគ្នាគឺ options/modifiers *,1,L,n,p & h មិនត្រូវបាន support ហើយវាមាន extra option q, q the q option formats ជា string នៅក្នុង form suitable ដើម្បីអាច readback។​


No comments:

Post a Comment