/**
* Returns a string that is formatted according to the justification type and the
* specified width. If the width is less than the length of the string, returns
* a string of stars (*) whose length equals the width.
* @param leftRight the type of justification ('l', 'c', or 'r').
* @param str the string to be formatted.
* @param width the number of columns in which the string is placed.
* Examples:
* <pre>
*
* String right = Format.justify('l', "Hi", 4);
* String left = Format.justify('c', "Hi", 4);
* String center = Format.justify('r', "Hi", 4);
* String noChange = Format.justify('r', "Hi", 2);
* String tooFew = Format.justify('r', "Hi", 1);
*
* left now refers to "Hi "
* center now refers to " Hi "
* right now refers to " Hi"
* noChange now refers to "Hi"
* tooFew now refers to "**"
* </pre>
*/
规范注释的说明形式和位置、@param参数、<pre>源代码示例
最新推荐文章于 2022-07-16 10:17:07 发布