T
Size: a a a
T
А
А
T
MS
T
T
MS
RE
final list = [1, 2, 3, 1, 2, 4, 5, 1, 6];
final oneCnt = list.where((e) => e == 1).length;
print(oneCnt); // 3
MS
bool XO(str) {
int x = 0;
int o = 0;
for (var i in str.toLowerCase().split('')) {
if (i == 'x')
x++;
else if (i == 'o')
o++;
}
return x == o;
}
T
bool XO(str) {
int x = 0;
int o = 0;
for (var i in str.toLowerCase().split('')) {
if (i == 'x')
x++;
else if (i == 'o')
o++;
}
return x == o;
}
RE
bool XO(str) {
int x = 0;
int o = 0;
for (var i in str.toLowerCase().split('')) {
if (i == 'x')
x++;
else if (i == 'o')
o++;
}
return x == o;
}
final allMatches = RegExp('o').allMatches('asdnjsdnvasocasdcasdoc');
print(allMatches.length); // 2
T
final allMatches = RegExp('o').allMatches('asdnjsdnvasocasdcasdoc');
print(allMatches.length); // 2
MZ
MZ
T