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)
Sun, Dec 15, 4:48 AM
Unknown Object (File)
Sun, Dec 15, 4:48 AM
Unknown Object (File)
Sun, Dec 15, 4:30 AM
Unknown Object (File)
Sun, Dec 15, 4:13 AM
Unknown Object (File)
Fri, Dec 13, 2:40 AM
Unknown Object (File)
Thu, Nov 28, 3:58 PM
Unknown Object (File)
Wed, Nov 27, 2:22 PM
Unknown Object (File)
Tue, Nov 26, 8:42 AM
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).