Page MenuHomePhabricator

Add `%LR` support to `csprintf`.
ClosedPublic

Authored by joshuaspence on May 20 2014, 11:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 14 2026, 6:31 PM
Unknown Object (File)
Feb 4 2026, 3:26 AM
Unknown Object (File)
Oct 19 2025, 9:00 PM
Unknown Object (File)
Oct 18 2025, 6:34 PM
Unknown Object (File)
Oct 7 2025, 1:17 AM
Unknown Object (File)
Oct 2 2025, 3:04 AM
Unknown Object (File)
Sep 29 2025, 11:43 PM
Unknown Object (File)
Sep 29 2025, 9:27 PM
Subscribers

Details

Summary

Allow csprintf to format an array of readable strings.

Test Plan

I didn't create any test cases because there aren't any existing test cases for csprintf. Instead, I used the following script:

<?php

require_once __DIR__.'/scripts/__init_script__.php';

echo csprintf('%LR', array('foo', '--not', 'bar'))."\n";
echo csprintf('%LR', array('foo', '--not bar'))."\n";

The output was as follows:

foo --not bar
foo '--not bar'

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Add `%LR` support to `csprintf`..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.May 20 2014, 11:29 PM
epriestley updated this revision to Diff 21917.

Closed by commit rPHU1ba1de50e9ee (authored by @joshuaspence, committed by @epriestley).