Home
last modified time | relevance | path

Searched refs:sb (Results 1 – 25 of 633) sorted by relevance

12345678910>>...26

/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/
DStringBuilderTest.java34 StringBuilder sb = new StringBuilder(); in test_Constructor() local
35 assertNotNull(sb); in test_Constructor()
36 assertEquals(16, sb.capacity()); in test_Constructor()
43 StringBuilder sb = new StringBuilder(24); in test_ConstructorI() local
44 assertNotNull(sb); in test_ConstructorI()
45 assertEquals(24, sb.capacity()); in test_ConstructorI()
62 StringBuilder sb = new StringBuilder((CharSequence) "fixture"); in test_ConstructorLjava_lang_CharSequence() local
63 assertEquals("fixture", sb.toString()); in test_ConstructorLjava_lang_CharSequence()
64 assertEquals("fixture".length() + 16, sb.capacity()); in test_ConstructorLjava_lang_CharSequence()
66 sb = new StringBuilder((CharSequence) new StringBuffer("fixture")); in test_ConstructorLjava_lang_CharSequence()
[all …]
DStringBufferTest.java138 StringBuffer sb = new StringBuffer(); in test_appendLjava_lang_CharSequence() local
139 assertSame(sb, sb.append((CharSequence) "ab")); in test_appendLjava_lang_CharSequence()
140 assertEquals("ab", sb.toString()); in test_appendLjava_lang_CharSequence()
141 sb.setLength(0); in test_appendLjava_lang_CharSequence()
142 assertSame(sb, sb.append((CharSequence) "cd")); in test_appendLjava_lang_CharSequence()
143 assertEquals("cd", sb.toString()); in test_appendLjava_lang_CharSequence()
144 sb.setLength(0); in test_appendLjava_lang_CharSequence()
145 assertSame(sb, sb.append((CharSequence) null)); in test_appendLjava_lang_CharSequence()
146 assertEquals("null", sb.toString()); in test_appendLjava_lang_CharSequence()
154 StringBuffer sb = new StringBuffer(); in test_appendLjava_lang_CharSequenceII() local
[all …]
DStringBuffer2Test.java38 StringBuffer sb = new StringBuffer(8); in test_ConstructorI() local
39 assertEquals("Newly constructed buffer is of incorrect length", 0, sb in test_ConstructorI()
49 StringBuffer sb = new StringBuffer("HelloWorld"); in test_ConstructorLjava_lang_String() local
51 assertTrue("Invalid buffer created", sb.length() == 10 in test_ConstructorLjava_lang_String()
52 && (sb.toString().equals("HelloWorld"))); in test_ConstructorLjava_lang_String()
82 StringBuffer sb = new StringBuffer(); in test_append$CII() local
85 sb.append(buf1, 0, buf1.length); in test_append$CII()
86 assertEquals("Buffer is invalid length after append", 5, sb.length()); in test_append$CII()
87 sb.append(buf2, 0, buf2.length); in test_append$CII()
88 assertEquals("Buffer is invalid length after append", 10, sb.length()); in test_append$CII()
[all …]
/external/smack/src/org/jivesoftware/smackx/
DXHTMLText.java52 StringBuilder sb = new StringBuilder("<a"); in appendOpenAnchorTag() local
54 sb.append(" href=\""); in appendOpenAnchorTag()
55 sb.append(href); in appendOpenAnchorTag()
56 sb.append("\""); in appendOpenAnchorTag()
59 sb.append(" style=\""); in appendOpenAnchorTag()
60 sb.append(style); in appendOpenAnchorTag()
61 sb.append("\""); in appendOpenAnchorTag()
63 sb.append(">"); in appendOpenAnchorTag()
64 text.append(sb.toString()); in appendOpenAnchorTag()
81 StringBuilder sb = new StringBuilder("<blockquote"); in appendOpenBlockQuoteTag() local
[all …]
/external/linux-tools-perf/util/
Dstrbuf.c19 void strbuf_init(struct strbuf *sb, ssize_t hint) in strbuf_init() argument
21 sb->alloc = sb->len = 0; in strbuf_init()
22 sb->buf = strbuf_slopbuf; in strbuf_init()
24 strbuf_grow(sb, hint); in strbuf_init()
27 void strbuf_release(struct strbuf *sb) in strbuf_release() argument
29 if (sb->alloc) { in strbuf_release()
30 free(sb->buf); in strbuf_release()
31 strbuf_init(sb, 0); in strbuf_release()
35 char *strbuf_detach(struct strbuf *sb, size_t *sz) in strbuf_detach() argument
37 char *res = sb->alloc ? sb->buf : NULL; in strbuf_detach()
[all …]
Dstrbuf.h58 static inline ssize_t strbuf_avail(const struct strbuf *sb) { in strbuf_avail() argument
59 return sb->alloc ? sb->alloc - sb->len - 1 : 0; in strbuf_avail()
64 static inline void strbuf_setlen(struct strbuf *sb, size_t len) { in strbuf_setlen() argument
65 if (!sb->alloc) in strbuf_setlen()
66 strbuf_grow(sb, 0); in strbuf_setlen()
67 assert(len < sb->alloc); in strbuf_setlen()
68 sb->len = len; in strbuf_setlen()
69 sb->buf[len] = '\0'; in strbuf_setlen()
73 static inline void strbuf_addch(struct strbuf *sb, int c) { in strbuf_addch() argument
74 strbuf_grow(sb, 1); in strbuf_addch()
[all …]
/external/qemu/slirp/
Dsbuf.c10 static void sbappendsb(struct sbuf *sb, struct mbuf *m);
21 sbfree(struct sbuf *sb) in sbfree() argument
23 free(sb->sb_data); in sbfree()
27 sbdrop(struct sbuf *sb, int num) in sbdrop() argument
33 if(num > sb->sb_cc) in sbdrop()
34 num = sb->sb_cc; in sbdrop()
35 sb->sb_cc -= num; in sbdrop()
36 sb->sb_rptr += num; in sbdrop()
37 if(sb->sb_rptr >= sb->sb_data + sb->sb_datalen) in sbdrop()
38 sb->sb_rptr -= sb->sb_datalen; in sbdrop()
[all …]
Dsocket.c91 struct sbuf *sb = &so->so_snd; in sopreprbuf() local
92 int len = sb->sb_datalen - sb->sb_cc; in sopreprbuf()
98 len = sb->sb_datalen - sb->sb_cc; in sopreprbuf()
103 iov[0].iov_base = sb->sb_wptr; in sopreprbuf()
106 if (sb->sb_wptr < sb->sb_rptr) { in sopreprbuf()
107 iov[0].iov_len = sb->sb_rptr - sb->sb_wptr; in sopreprbuf()
115 iov[0].iov_len = (sb->sb_data + sb->sb_datalen) - sb->sb_wptr; in sopreprbuf()
120 iov[1].iov_base = sb->sb_data; in sopreprbuf()
121 iov[1].iov_len = sb->sb_rptr - sb->sb_data; in sopreprbuf()
158 struct sbuf *sb = &so->so_snd; in soread() local
[all …]
/external/qemu/slirp-android/
Dsbuf.c10 static void sbappendsb(struct sbuf *sb, struct mbuf *m);
21 sbfree(struct sbuf *sb) in sbfree() argument
23 free(sb->sb_data); in sbfree()
27 sbdrop(struct sbuf *sb, int num) in sbdrop() argument
33 if(num > sb->sb_cc) in sbdrop()
34 num = sb->sb_cc; in sbdrop()
35 sb->sb_cc -= num; in sbdrop()
36 sb->sb_rptr += num; in sbdrop()
37 if(sb->sb_rptr >= sb->sb_data + sb->sb_datalen) in sbdrop()
38 sb->sb_rptr -= sb->sb_datalen; in sbdrop()
[all …]
Dsocket.c99 struct sbuf *sb = &so->so_snd; in sopreprbuf() local
100 int len = sb->sb_datalen - sb->sb_cc; in sopreprbuf()
106 len = sb->sb_datalen - sb->sb_cc; in sopreprbuf()
111 iov[0].iov_base = sb->sb_wptr; in sopreprbuf()
114 if (sb->sb_wptr < sb->sb_rptr) { in sopreprbuf()
115 iov[0].iov_len = sb->sb_rptr - sb->sb_wptr; in sopreprbuf()
123 iov[0].iov_len = (sb->sb_data + sb->sb_datalen) - sb->sb_wptr; in sopreprbuf()
128 iov[1].iov_base = sb->sb_data; in sopreprbuf()
129 iov[1].iov_len = sb->sb_rptr - sb->sb_data; in sopreprbuf()
166 struct sbuf *sb = &so->so_snd; in soread() local
[all …]
/external/e2fsprogs/lib/e2p/
Dls.c178 void list_super2(struct ext2_super_block * sb, FILE *f) in list_super2() argument
184 inode_blocks_per_group = (((sb->s_inodes_per_group * in list_super2()
185 EXT2_INODE_SIZE(sb)) + in list_super2()
186 EXT2_BLOCK_SIZE(sb) - 1) / in list_super2()
187 EXT2_BLOCK_SIZE(sb)); in list_super2()
188 if (sb->s_volume_name[0]) { in list_super2()
190 strncpy(buf, sb->s_volume_name, sizeof(sb->s_volume_name)); in list_super2()
194 if (sb->s_last_mounted[0]) { in list_super2()
196 strncpy(buf, sb->s_last_mounted, sizeof(sb->s_last_mounted)); in list_super2()
200 fprintf(f, "Filesystem UUID: %s\n", e2p_uuid2str(sb->s_uuid)); in list_super2()
[all …]
/external/e2fsprogs/lib/ext2fs/
Dswapfs.c24 void ext2fs_swap_super(struct ext2_super_block * sb) in ext2fs_swap_super() argument
27 sb->s_inodes_count = ext2fs_swab32(sb->s_inodes_count); in ext2fs_swap_super()
28 sb->s_blocks_count = ext2fs_swab32(sb->s_blocks_count); in ext2fs_swap_super()
29 sb->s_r_blocks_count = ext2fs_swab32(sb->s_r_blocks_count); in ext2fs_swap_super()
30 sb->s_free_blocks_count = ext2fs_swab32(sb->s_free_blocks_count); in ext2fs_swap_super()
31 sb->s_free_inodes_count = ext2fs_swab32(sb->s_free_inodes_count); in ext2fs_swap_super()
32 sb->s_first_data_block = ext2fs_swab32(sb->s_first_data_block); in ext2fs_swap_super()
33 sb->s_log_block_size = ext2fs_swab32(sb->s_log_block_size); in ext2fs_swap_super()
34 sb->s_log_frag_size = ext2fs_swab32(sb->s_log_frag_size); in ext2fs_swap_super()
35 sb->s_blocks_per_group = ext2fs_swab32(sb->s_blocks_per_group); in ext2fs_swap_super()
[all …]
/external/smack/src/org/xbill/DNS/
DSOARecord.java78 StringBuffer sb = new StringBuffer(); in rrToString() local
79 sb.append(host); in rrToString()
80 sb.append(" "); in rrToString()
81 sb.append(admin); in rrToString()
83 sb.append(" (\n\t\t\t\t\t"); in rrToString()
84 sb.append(serial); in rrToString()
85 sb.append("\t; serial\n\t\t\t\t\t"); in rrToString()
86 sb.append(refresh); in rrToString()
87 sb.append("\t; refresh\n\t\t\t\t\t"); in rrToString()
88 sb.append(retry); in rrToString()
[all …]
DTSIGRecord.java99 StringBuffer sb = new StringBuffer(); in rrToString() local
100 sb.append(alg); in rrToString()
101 sb.append(" "); in rrToString()
103 sb.append("(\n\t"); in rrToString()
105 sb.append (timeSigned.getTime() / 1000); in rrToString()
106 sb.append (" "); in rrToString()
107 sb.append (fudge); in rrToString()
108 sb.append (" "); in rrToString()
109 sb.append (signature.length); in rrToString()
111 sb.append ("\n"); in rrToString()
[all …]
/external/jsilver/src/com/google/streamhtmlparser/util/
DEntityResolver.java119 private final StringBuilder sb; field in EntityResolver
133 sb = new StringBuilder(); in EntityResolver()
146 sb = new StringBuilder(); in EntityResolver()
147 sb.replace(0, sb.length(), aEntityResolver.sb.toString()); in EntityResolver()
158 sb.setLength(0); in reset()
172 sb.length(), sb.toString()); in toString()
197 Preconditions.checkState(status != Status.NOT_STARTED || sb.length() == 0); in processChar()
200 sb.append(input); in processChar()
208 if (sb.length() < MAX_ENTITY_SIZE) { in processChar()
209 sb.append(input); in processChar()
[all …]
/external/jdiff/src/jdiff/
DAPI.java293 StringBuffer sb = new StringBuffer(htmlText); in hideHTMLTags() local
295 while (i < sb.length()) { in hideHTMLTags()
296 if (sb.charAt(i) == '<') { in hideHTMLTags()
297 sb.setCharAt(i ,'l'); in hideHTMLTags()
298 sb.insert(i+1, "EsS_tHaN"); in hideHTMLTags()
299 } else if (sb.charAt(i) == '&') { in hideHTMLTags()
300 sb.setCharAt(i ,'a'); in hideHTMLTags()
301 sb.insert(i+1, "Nd_cHaR"); in hideHTMLTags()
302 } else if (sb.charAt(i) == '"') { in hideHTMLTags()
303 sb.setCharAt(i ,'q'); in hideHTMLTags()
[all …]
/external/dexmaker/src/dx/java/com/android/dx/rop/code/
DAccessFlags.java298 StringBuffer sb = new StringBuffer(80); in humanHelper() local
304 sb.append("|public"); in humanHelper()
307 sb.append("|private"); in humanHelper()
310 sb.append("|protected"); in humanHelper()
313 sb.append("|static"); in humanHelper()
316 sb.append("|final"); in humanHelper()
320 sb.append("|super"); in humanHelper()
322 sb.append("|synchronized"); in humanHelper()
327 sb.append("|bridge"); in humanHelper()
329 sb.append("|volatile"); in humanHelper()
[all …]
DInsn.java306 StringBuffer sb = new StringBuffer(80); in toStringWithInline() local
308 sb.append("Insn{"); in toStringWithInline()
309 sb.append(position); in toStringWithInline()
310 sb.append(' '); in toStringWithInline()
311 sb.append(opcode); in toStringWithInline()
314 sb.append(' '); in toStringWithInline()
315 sb.append(extra); in toStringWithInline()
318 sb.append(" :: "); in toStringWithInline()
321 sb.append(result); in toStringWithInline()
322 sb.append(" <- "); in toStringWithInline()
[all …]
/external/chromium_org/ppapi/native_client/tests/nacl_browser/fault_injection/
Dfault_pm_nameservice_test.cc43 void dump_output(nacl::StringBuffer *sb, int d, size_t nbytes) { in dump_output() argument
68 sb->Printf("\n%04x:", ix); in dump_output()
70 sb->Printf(" "); in dump_output()
72 sb->Printf("%02x", bytes[ix]); in dump_output()
74 sb->Printf("\n"); in dump_output()
77 void EnumerateNames(NaClSrpcChannel *nschan, nacl::StringBuffer *sb) { in EnumerateNames() argument
84 sb->Printf("NaClSrpcInvokeBySignature failed\n"); in EnumerateNames()
87 sb->Printf("nbytes = %u\n", (size_t) nbytes); in EnumerateNames()
89 sb->Printf("Insufficent space for namespace enumeration\n"); in EnumerateNames()
98 sb->Printf("%s\n", p); in EnumerateNames()
[all …]
/external/chromium_org/ppapi/native_client/tests/nacl_browser/nameservice/
Dpm_nameservice_test.cc43 void dump_output(nacl::StringBuffer *sb, int d, size_t nbytes) { in dump_output() argument
68 sb->Printf("\n%04x:", ix); in dump_output()
70 sb->Printf(" "); in dump_output()
72 sb->Printf("%02x", bytes[ix]); in dump_output()
74 sb->Printf("\n"); in dump_output()
77 void EnumerateNames(NaClSrpcChannel *nschan, nacl::StringBuffer *sb) { in EnumerateNames() argument
84 sb->Printf("NaClSrpcInvokeBySignature failed\n"); in EnumerateNames()
87 sb->Printf("nbytes = %u\n", (size_t) nbytes); in EnumerateNames()
89 sb->Printf("Insufficent space for namespace enumeration\n"); in EnumerateNames()
98 sb->Printf("%s\n", p); in EnumerateNames()
[all …]
/external/dexmaker/src/dx/java/com/android/dx/dex/code/
DInsnFormat.java60 StringBuilder sb = new StringBuilder(100); in listingString() local
62 sb.append(op); in listingString()
65 sb.append(' '); in listingString()
66 sb.append(arg); in listingString()
70 sb.append(" // "); in listingString()
71 sb.append(comment); in listingString()
74 return sb.toString(); in listingString()
184 StringBuffer sb = new StringBuffer(sz * 5 + 2); in regListString() local
186 sb.append('{'); in regListString()
190 sb.append(", "); in regListString()
[all …]
/external/chromium_org/ppapi/native_client/tests/nacl_browser/manifest_file/
Dpm_pre_init_manifest_file_test.cc45 nacl::StringBuffer sb; in TestManifestContents() local
59 sb.Printf("Srpc client channel ctor failed\n"); in TestManifestContents()
60 manifest_contents = new std::string(sb.ToString()); in TestManifestContents()
63 sb.Printf("NaClSrpcClientCtor succeeded\n"); in TestManifestContents()
71 sb.Printf("nameservice lookup failed, status %d\n", status); in TestManifestContents()
72 manifest_contents = new std::string(sb.ToString()); in TestManifestContents()
75 sb.Printf("Got manifest descriptor %d\n", manifest); in TestManifestContents()
77 manifest_contents = new std::string(sb.ToString()); in TestManifestContents()
84 sb.Printf("got manifest connection %d\n", manifest_conn); in TestManifestContents()
86 sb.Printf("could not connect\n"); in TestManifestContents()
[all …]
Dpm_manifest_file_test.cc97 void Initialize(nacl::StringBuffer *sb);
98 void NameServiceDump(nacl::StringBuffer *sb);
99 void ManifestListTest(nacl::StringBuffer *sb);
100 void ManifestOpenTest(nacl::StringBuffer *sb);
110 bool InitializeChannel(nacl::StringBuffer *sb);
144 void (Worker::*mfunc)(nacl::StringBuffer *sb);
176 bool EnumerateNames(NaClSrpcChannel *nschan, nacl::StringBuffer *sb) { in EnumerateNames() argument
184 sb->Printf("EnumerateNames: initial malloc failed\n"); in EnumerateNames()
194 sb->Printf("NaClSrpcInvokeBySignature failed\n"); in EnumerateNames()
197 sb->Printf("EnumerateNames: in_out_nbytes %d\n", in_out_nbytes); in EnumerateNames()
[all …]
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowSQLiteQueryBuilder.java19 StringBuilder sb = new StringBuilder("SELECT "); in buildQueryString() local
22 sb.append("DISTINCT "); in buildQueryString()
26 sb.append(Join.join(", ", (Object[]) columns)); in buildQueryString()
28 sb.append("*"); in buildQueryString()
31 sb.append(" FROM "); in buildQueryString()
32 sb.append(tables); in buildQueryString()
34 conditionallyAppend(sb, " WHERE ", where); in buildQueryString()
35 conditionallyAppend(sb, " GROUP BY ", groupBy); in buildQueryString()
36 conditionallyAppend(sb, " HAVING ", having); in buildQueryString()
37 conditionallyAppend(sb, " ORDER BY ", orderBy); in buildQueryString()
[all …]
/external/chromium_org/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/
DDOMUtils.java30 StringBuilder sb = new StringBuilder(); in getNodeBounds() local
31 sb.append("(function() {"); in getNodeBounds()
32 sb.append(" var node = document.getElementById('" + nodeId + "');"); in getNodeBounds()
33 sb.append(" if (!node) return null;"); in getNodeBounds()
34 sb.append(" var width = node.offsetWidth;"); in getNodeBounds()
35 sb.append(" var height = node.offsetHeight;"); in getNodeBounds()
36 sb.append(" var x = -window.scrollX;"); in getNodeBounds()
37 sb.append(" var y = -window.scrollY;"); in getNodeBounds()
38 sb.append(" do {"); in getNodeBounds()
39 sb.append(" x += node.offsetLeft;"); in getNodeBounds()
[all …]

12345678910>>...26