Lines Matching refs:string

9 expect(BString &string, const char *expect, size_t bytes, int32 chars)
12 printf("got: \"%s\" %lu %ld\n", string.String(), string.Length(), string.CountChars());
13 if (bytes != (size_t)string.Length()) {
18 if (chars != string.CountChars()) {
23 if (memcmp(string.String(), expect, bytes) != 0) {
24 printf("expected string mismatch\n");
33 printf("setting string to ��-��-��\n");
34 BString string("��-��-��");
35 expect(string, "��-��-��", 8, 5);
38 string.ReplaceCharsSet("����", B_UTF8_ELLIPSIS);
39 expect(string, B_UTF8_ELLIPSIS "-��-" B_UTF8_ELLIPSIS, 10, 5);
41 printf("moving the last char (ellipsis) to a seperate string\n");
43 string.MoveCharsInto(ellipsis, 4, 1);
44 expect(string, B_UTF8_ELLIPSIS "-��-", 7, 4);
48 string.RemoveCharsSet("-" B_UTF8_ELLIPSIS);
49 expect(string, "��", 2, 1);
51 printf("reset the string to ������" B_UTF8_ELLIPSIS "������\n");
52 string.SetToChars("������" B_UTF8_ELLIPSIS "������", 5);
53 expect(string, "������" B_UTF8_ELLIPSIS "��", 11, 5);
55 printf("truncating string to 4 characters\n");
56 string.TruncateChars(4);
57 expect(string, "������" B_UTF8_ELLIPSIS, 9, 4);
60 string.AppendChars("������", 2);
61 expect(string, "������" B_UTF8_ELLIPSIS "����", 13, 6);
64 string.RemoveChars(1, 3);
65 expect(string, "������", 6, 3);
68 string.InsertChars("������" B_UTF8_ELLIPSIS B_UTF8_ELLIPSIS "��", 3, 2, 1);
69 expect(string, "��" B_UTF8_ELLIPSIS B_UTF8_ELLIPSIS "����", 12, 5);
72 string.PrependChars("����+����", 3);
73 expect(string, "����+��" B_UTF8_ELLIPSIS B_UTF8_ELLIPSIS "����", 17, 8);
77 if (string.CompareChars(compare, 5) != 0) {
83 if (string.CompareChars(compare, 6) == 0) {
89 if (string.CountBytes(2, 3) != 6) {