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)
Mon, Feb 24, 11:49 AM
Unknown Object (File)
Mon, Feb 24, 2:53 AM
Unknown Object (File)
Thu, Feb 13, 1:34 AM
Unknown Object (File)
Thu, Feb 13, 1:34 AM
Unknown Object (File)
Sun, Feb 9, 1:06 PM
Unknown Object (File)
Sun, Feb 9, 1:06 PM
Unknown Object (File)
Sun, Feb 9, 1:06 PM
Unknown Object (File)
Sun, Feb 9, 1:06 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).