-
Notifications
You must be signed in to change notification settings - Fork 0
dev note (for me)
Nasoki-Koide edited this page Nov 26, 2023
·
14 revisions
- Create
32 classes:Source,LeftString, RightString.- Source will be a primitive string. If I want to add property or method, I will overload Execute method which is described later.
- LeftString and RightString will inherit same interface.
- LeftString and RightString will have SearchDirection property. (
I have to check dictionary later whether it is a correct English.Some websites written in English uses such expression.) - StringExtractor will be a static class which have a Execute method. Parameters are Source, FirstString, SecondString. (I have to reconsider the naming of them. How about FirstSearch and SecondSearch?)
- Execute method should return some class instead of simple string. For future extend.
- Q.Is it possible to use callback to find index?
A.It is difficult. For example, if you create a callback which wraps string.IndexOf method, you must have a good idea to assign the startIndex dynamically.