lioncash
3e0c04a83e
Common: Fix a potential infinite loop in ReplaceAll
...
Prior to this change, it was possible to cause an infinite loop by making the string to be replaced and the replacing string the same thing.
e.g.
std::string some_str = "test";
ReplaceAll(some_str, "test", "test");
This also changes the replacing in a way that doesn't require starting from the beginning of the string on each replacement iteration.
2014-09-05 15:12:17 -04:00
..
2014-07-13 02:16:51 +02:00
2014-09-03 19:50:02 -04:00
2014-06-15 15:56:42 -07:00
2014-08-30 18:06:35 -04:00
2014-07-11 16:10:20 +02:00
2014-08-30 18:06:35 -04:00
2014-08-30 18:06:35 -04:00
2014-03-29 11:05:44 +01:00
2014-06-11 20:58:40 +02:00
2014-03-09 21:14:26 +01:00
2014-08-30 18:06:35 -04:00
2014-07-11 16:07:23 +02:00
2014-02-18 02:19:10 -05:00
2014-08-28 15:35:19 -04:00
2014-08-14 23:51:13 -07:00
2014-04-09 13:53:43 -05:00
2014-09-02 00:52:13 -04:00
2014-02-18 02:19:10 -05:00
2014-08-23 10:48:48 -07:00
2014-09-01 21:27:44 -07:00
2014-08-17 21:52:40 -07:00
2014-09-01 21:27:45 -07:00
2014-02-22 23:37:29 +01:00
2014-02-22 23:37:29 +01:00
2014-08-24 09:14:54 -07:00
2014-08-15 15:18:28 -04:00
2014-08-17 21:52:40 -07:00
2014-08-30 18:06:35 -04:00
2014-07-11 16:10:20 +02:00
2014-03-09 21:14:26 +01:00
2014-03-11 00:35:07 +13:00
2014-02-10 18:07:16 -05:00
2014-08-30 18:06:35 -04:00
2014-03-14 13:51:23 -04:00
2014-08-30 18:06:35 -04:00
2014-04-14 23:13:15 +02:00
2014-03-09 15:24:35 +01:00
2014-08-04 00:45:07 -04:00
2014-08-04 00:45:07 -04:00
2014-03-09 15:24:35 +01:00
2014-05-29 21:44:41 -04:00
2014-02-22 23:37:29 +01:00
2014-09-04 03:29:49 -04:00
2014-09-04 03:29:49 -04:00
2014-03-14 13:51:23 -04:00
2014-07-20 12:33:56 -07:00
2014-09-03 12:15:30 -07:00
2014-09-05 10:26:30 -07:00
2014-08-30 18:06:35 -04:00
2014-02-22 23:37:29 +01:00
2014-08-10 05:28:00 -04:00
2014-02-22 23:37:29 +01:00
2014-03-09 21:14:26 +01:00
2014-03-11 00:35:07 +13:00
2014-07-11 16:10:20 +02:00
2014-03-29 11:05:44 +01:00
2014-09-03 18:03:23 -04:00
2014-03-07 21:40:59 +13:00
2014-03-07 21:40:59 +13:00
2014-06-22 20:04:46 +02:00
2014-06-22 20:04:46 +02:00
2014-08-13 03:57:10 -07:00
2014-03-14 13:51:23 -04:00
2014-03-14 13:51:23 -04:00
2014-08-30 18:06:35 -04:00
2014-03-29 11:05:44 +01:00
2014-05-06 12:32:03 +02:00
2014-09-05 15:12:17 -04:00
2014-09-04 21:30:33 -04:00
2014-03-14 13:51:23 -04:00
2014-03-14 13:51:23 -04:00
2014-07-11 16:07:23 +02:00
2014-05-29 21:44:41 -04:00
2014-09-04 09:15:18 -04:00
2014-08-16 23:33:19 -04:00
2014-03-29 11:05:44 +01:00
2014-02-18 02:19:10 -05:00
2014-07-30 02:04:17 -04:00
2014-08-30 18:06:35 -04:00
2014-09-02 10:56:14 -07:00
2014-04-25 01:11:52 +02:00
2014-04-24 16:36:03 +02:00
2014-08-24 09:14:54 -07:00
2014-09-03 10:04:01 -07:00
2014-09-03 10:04:01 -07:00
2014-08-03 13:49:46 -05:00
2014-08-10 14:50:29 -07:00