From 9189d09e53334ae6389a37cead694a2ba99e6092 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 5 Oct 2017 21:28:31 -0700 Subject: [PATCH] Remove Str\split_args_switched Summary: See #3. Reviewed By: fredemmott Differential Revision: D5993148 fbshipit-source-id: 3f0bfdd65e2e80290beec84ee922ea6e2f7b58a2 --- src/str/divide.php | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/str/divide.php b/src/str/divide.php index de449d3e..15de8646 100644 --- a/src/str/divide.php +++ b/src/str/divide.php @@ -35,38 +35,6 @@ function split( string $string, string $delimiter, ?int $limit = null, -): vec { - return namespace\split_args_switched($string, $delimiter, $limit); -} - -/** - * Q: What is this gross function? - * A: Currently, this API is inconsistent with the rest of the library, whose - * principle is that the "element being operated on" (in this case, the target - * string) should be the first element. This temporary function will be used - * to correct that inconsistency. - * - * Q: Why are you disrupting my workflow? - * A: We recognize that this will be disruptive in the short term and apologize - * for the inconvenience. However, it provides the benefit of predictablity - * for all future users of the HSL. - * - * Q: But why now? - * We are expecting to mark the HSL as 1.0 soon, so this is our only chance to - * fix this. - * - * Q: Okay, fine... what's the game plan? - * A: All uses of Str\split will be codemodded to Str\split_args_switched, and - * Str\split will be temporarily deprecated. After a short period, Str\split - * will be fixed, all callsites will be codemodded back, and this function will - * be removed. - * - * Task: T17219441 - */ -function split_args_switched( - string $string, - string $delimiter, - ?int $limit = null, ): vec { if ($delimiter === '') { if ($limit === null || $limit >= \strlen($string)) {