Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Issue 322253005: add replace_char() method to SkString API (skbug.com/2651) (Closed)

Created:
6 years, 6 months ago by rs.prinja
Modified:
5 years, 10 months ago
Reviewers:
tfarina, mtklein, dw.im, reed1
CC:
skia-review_googlegroups.com, epoger, bsalomon, bungeman-skia, scroggo, tfarina
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

add replace_char() method to SkString API (skbug.com/2651) Provide a method in the SkString API to replace all occurrences of one char with another. BUG=skia:2651

Patch Set 1 #

Total comments: 6

Patch Set 2 : Faster replacement + added unit tests #

Total comments: 3

Patch Set 3 : Shift tests into DEF_TEST as requested #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -0 lines) Patch
M include/core/SkString.h View 1 2 1 chunk +2 lines, -0 lines 1 comment Download
M src/core/SkString.cpp View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M tests/StringTest.cpp View 1 2 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (1 generated)
rs.prinja
The CQ bit was checked by rs.prinja@samsung.com
6 years, 6 months ago (2014-06-11 05:14:55 UTC) #1
rs.prinja
The CQ bit was unchecked by rs.prinja@samsung.com
6 years, 6 months ago (2014-06-11 05:15:01 UTC) #2
rs.prinja
6 years, 6 months ago (2014-06-11 05:16:12 UTC) #3
rs.prinja
6 years, 6 months ago (2014-06-11 06:35:09 UTC) #4
epoger
I will defer to reed on this core API change (you'll need his approval to ...
6 years, 6 months ago (2014-06-11 11:01:33 UTC) #5
rs.prinja
https://codereview.chromium.org/322253005/diff/1/include/core/SkString.h File include/core/SkString.h (right): https://codereview.chromium.org/322253005/diff/1/include/core/SkString.h#newcode193 include/core/SkString.h:193: On 2014/06/11 11:01:33, epoger wrote: > Please add unittests ...
6 years, 6 months ago (2014-06-11 12:08:03 UTC) #6
reed1
esp. since the caller is in a tool, and not in the core, I suggest ...
6 years, 6 months ago (2014-06-11 12:11:35 UTC) #7
epoger
On 2014/06/11 12:11:35, reed1 wrote: > esp. since the caller is in a tool, and ...
6 years, 6 months ago (2014-06-11 13:27:23 UTC) #8
reed1
at the moment is is just called by one test, so I would place it ...
6 years, 6 months ago (2014-06-11 13:32:52 UTC) #9
epoger
On 2014/06/11 13:32:52, reed1 wrote: > at the moment is is just called by one ...
6 years, 6 months ago (2014-06-11 13:36:26 UTC) #10
reed1
ah, my bad. I should have read the accompanying bug. Now I see the motivation. ...
6 years, 6 months ago (2014-06-11 13:40:50 UTC) #11
rs.prinja
On 2014/06/11 13:40:50, reed1 wrote: > ah, my bad. I should have read the accompanying ...
6 years, 6 months ago (2014-06-13 06:39:31 UTC) #12
tfarina
https://codereview.chromium.org/322253005/diff/20001/tests/StringTest.cpp File tests/StringTest.cpp (right): https://codereview.chromium.org/322253005/diff/20001/tests/StringTest.cpp#newcode151 tests/StringTest.cpp:151: a.set("hello world"); If Elliot and Mike don't mind, could ...
6 years, 6 months ago (2014-06-13 17:02:10 UTC) #13
rs.prinja
On 2014/06/13 17:02:10, tfarina wrote: > https://codereview.chromium.org/322253005/diff/20001/tests/StringTest.cpp > File tests/StringTest.cpp (right): > > https://codereview.chromium.org/322253005/diff/20001/tests/StringTest.cpp#newcode151 > ...
6 years, 6 months ago (2014-06-17 04:18:30 UTC) #14
epoger
On 2014/06/17 04:18:30, rs.prinja wrote: > On 2014/06/13 17:02:10, tfarina wrote: > > https://codereview.chromium.org/322253005/diff/20001/tests/StringTest.cpp > ...
6 years, 6 months ago (2014-06-17 10:26:14 UTC) #15
scroggo
On 2014/06/17 04:18:30, rs.prinja wrote: > On 2014/06/13 17:02:10, tfarina wrote: > > https://codereview.chromium.org/322253005/diff/20001/tests/StringTest.cpp > ...
6 years, 6 months ago (2014-06-17 13:49:21 UTC) #16
mtklein
I'd rather not add methods that can be implemented just as efficiently with a public ...
6 years, 6 months ago (2014-06-17 14:31:18 UTC) #17
rs.prinja
On 2014/06/17 14:31:18, mtklein wrote: > I'd rather not add methods that can be implemented ...
6 years, 6 months ago (2014-06-18 01:11:32 UTC) #18
rs.prinja
6 years, 6 months ago (2014-06-19 10:36:25 UTC) #19
rs.prinja
ping, PTAL and let me know how to proceed. thank you
6 years, 6 months ago (2014-06-24 08:36:47 UTC) #20
tfarina
Reducing the reviewers list here.
6 years, 5 months ago (2014-07-04 00:54:53 UTC) #21
mtklein
> So to clarify, replaceChar() remains in SkString{.h,.cpp} and replaceStr() goes > in SkStringUtils? Or ...
6 years, 5 months ago (2014-07-07 13:06:02 UTC) #22
tfarina
rs.prinja do you mind if I take this from you?
6 years, 4 months ago (2014-08-13 17:23:09 UTC) #23
reed1
https://codereview.chromium.org/322253005/diff/40001/include/core/SkString.h File include/core/SkString.h (right): https://codereview.chromium.org/322253005/diff/40001/include/core/SkString.h#newcode194 include/core/SkString.h:194: void replaceChar(char oldChar, char newChar); ick -- are we ...
6 years, 4 months ago (2014-08-13 19:13:36 UTC) #24
dw.im
Dear Rohan, will you keep working on this?
6 years, 3 months ago (2014-09-15 00:34:12 UTC) #26
rohan.prinja
@tfarina, mtklein, dw.im Terribly sorry for not responding earlier. @tfarina No problem
6 years, 3 months ago (2014-09-15 20:09:10 UTC) #27
tfarina
6 years, 2 months ago (2014-10-11 21:09:56 UTC) #28
I have made an initial CL -> https://codereview.chromium.org/646213002.

More to come after it lands.

Powered by Google App Engine
This is Rietveld 408576698