-
Notifications
You must be signed in to change notification settings - Fork 0
/
StringMatching.java
32 lines (23 loc) · 771 Bytes
/
StringMatching.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import java.util.*;
import java.io.*;
class StringMatching {
String textInput;
ArrayList<Character> arrayKarakterInputnya;
public StringMatching(String dariMain) {
textInput = dariMain;
arrayKarakterInputnya = new ArrayList<Character>(dariMain.length());
}
public void algoritmaBoyerMoore(String patternInput) {
ArrayList<Character> patternVec = new ArrayList<Character>(patternInput.length());
patternVec = fromStringToVector(patternInput);
int ip = 0;
int it = patternVec.size();
}
public ArrayList<Character> fromStringToVector(String convert) {
ArrayList<Character> vecOutput = new ArrayList<Character>(convert.length());
for (int i = 0; i < convert.length(); i++) {
vecOutput.add(i, convert.charAt(i));
}
return vecOutput;
}
}