1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

docs(printf): fix incorrect cutoff value in examples (#5080)

This commit is contained in:
Anton L.
2026-01-12 01:28:47 +05:00
committed by GitHub
parent 5e6944e79f
commit 49999607f4

View File

@@ -115,8 +115,8 @@ printf("[%-10s]\n", $s); // left-justification with spaces
printf("[%010s]\n", $s); // zero-padding works on strings too
printf("[%'#10s]\n", $s); // use the custom padding character '#'
printf("[%'#*s]\n", 10, $s); // Provide the padding width as an additional argument
printf("[%10.9s]\n", $t); // right-justification but with a cutoff of 8 characters
printf("[%-10.9s]\n", $t); // left-justification but with a cutoff of 8 characters
printf("[%10.9s]\n", $t); // right-justification but with a cutoff of 9 characters
printf("[%-10.9s]\n", $t); // left-justification but with a cutoff of 9 characters
?>
]]>
</programlisting>