Home
last modified time | relevance | path

Searched refs:str (Results 1 – 25 of 148) sorted by relevance

123456

/device/generic/opengl-transport/host/commands/emugen/
DstrUtils.cpp21 std::string getNextToken(const std::string & str, size_t pos, size_t * last, const std::string & de… in getNextToken() argument
23 if (str.size() == 0 || pos >= str.size()) return ""; in getNextToken()
25 pos = str.find_first_not_of(WHITESPACE, pos); in getNextToken()
28 *last = str.find_first_of(delim, pos); in getNextToken()
29 if (*last == std::string::npos) *last = str.size(); in getNextToken()
30 std::string retval = str.substr(pos, *last - pos); in getNextToken()
36 std::string trim(const string & str) in trim() argument
39 string::size_type start = str.find_first_not_of(WHITESPACE, 0); in trim()
40 string::size_type end = str.find_last_not_of(WHITESPACE); in trim()
44 result = str.substr(start, end - start + 1); in trim()
DTypeFactory.cpp66 std::string str = trim(line); in initFromFile() local
67 if (str.size() == 0 || str.at(0) == '#') { in initFromFile()
72 name = getNextToken(str, pos, &last, WHITESPACE); in initFromFile()
80 size = getNextToken(str, pos, &last, WHITESPACE); in initFromFile()
87 printString = getNextToken(str, pos, &last, WHITESPACE); in initFromFile()
100 pointerDef = getNextToken(str, pos, &last, WHITESPACE); in initFromFile()
DstrUtils.h24 std::string trim(const std::string & str);
25 std::string getNextToken(const std::string & str, size_t pos, size_t * last, const std::string & de…
29 return ss.str(); in toString()
/device/linaro/hikey/hifi/xaf/hifi-dpf/ipc/xt-shmem/hikey/
Ddsp_debug.c232 char* dsp_om_trim_zero(char* str) in dsp_om_trim_zero() argument
237 if (!str) in dsp_om_trim_zero()
240 str_begin = str; in dsp_om_trim_zero()
241 str_end = str + strlen(str); in dsp_om_trim_zero()
263 char * dsp_om_split_str(char* str, char** split_str) in dsp_om_split_str() argument
268 if ((!str) || (!split_str)) { in dsp_om_split_str()
270 return str; in dsp_om_split_str()
273 str_end = str + strlen(str); in dsp_om_split_str()
274 str_begin = dsp_om_trim_zero(str); in dsp_om_split_str()
336 static void dsp_om_read_mem(char *str) in dsp_om_read_mem() argument
[all …]
/device/google/contexthub/firmware/lib/libc/
Dstrlen.c56 strlen (const char* str) in strlen() argument
67 : "=&r" (len), "=&r" (scratch) : "r" (str) : "memory", "cc"); in strlen()
75 : "=&r" (end), "=&r" (scratch) : "0" (str) : "memory", "cc"); in strlen()
76 return end - str - 1; in strlen()
85 strlen (const char* str) in strlen() argument
87 (void)str; /* disable unused argument warning */ in strlen()
/device/google/coral/json-c/
Djson_tokener.c159 struct json_object* json_tokener_parse(const char *str) in json_tokener_parse() argument
163 obj = json_tokener_parse_verbose(str, &jerr_ignored); in json_tokener_parse()
167 struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *error) in json_tokener_parse_verbose() argument
175 obj = json_tokener_parse_ex(tok, str, -1); in json_tokener_parse_verbose()
217 (((dest) = *str), 1) \
225 #define ADVANCE_CHAR(str, tok) \ argument
226 ( ++(str), ((tok)->char_offset)++, c)
233 const char *str, int len) in json_tokener_parse_ex() argument
253 if ((len < -1) || (len == -1 && strlen(str) > INT32_MAX)) { in json_tokener_parse_ex()
266 if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok))) in json_tokener_parse_ex()
[all …]
Djson_tokener.h80 char *str; member
125 extern struct json_object* json_tokener_parse(const char *str);
126 extern struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *err…
202 const char *str, int len);
Djson_object.c100 static int json_escape_str(struct printbuf *pb, char *str, int len) in json_escape_str() argument
106 c = str[pos]; in json_escape_str()
118 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
135 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
145 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
534 if (json_parse_int64(jso->o.c_string.str, &cint64) != 0) in json_object_get_int()
582 if (json_parse_int64(jso->o.c_string.str, &cint) == 0) in json_object_get_int64()
689 cdouble = strtod(jso->o.c_string.str,&errPtr); in json_object_get_double()
692 if (errPtr == jso->o.c_string.str) in json_object_get_double()
732 json_escape_str(pb, jso->o.c_string.str, jso->o.c_string.len); in json_object_string_to_json_string()
[all …]
/device/google/crosshatch/json-c/
Djson_tokener.c159 struct json_object* json_tokener_parse(const char *str) in json_tokener_parse() argument
163 obj = json_tokener_parse_verbose(str, &jerr_ignored); in json_tokener_parse()
167 struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *error) in json_tokener_parse_verbose() argument
175 obj = json_tokener_parse_ex(tok, str, -1); in json_tokener_parse_verbose()
217 (((dest) = *str), 1) \
225 #define ADVANCE_CHAR(str, tok) \ argument
226 ( ++(str), ((tok)->char_offset)++, c)
233 const char *str, int len) in json_tokener_parse_ex() argument
253 if ((len < -1) || (len == -1 && strlen(str) > INT32_MAX)) { in json_tokener_parse_ex()
266 if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok))) in json_tokener_parse_ex()
[all …]
Djson_tokener.h80 char *str; member
125 extern struct json_object* json_tokener_parse(const char *str);
126 extern struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *err…
202 const char *str, int len);
Djson_object.c100 static int json_escape_str(struct printbuf *pb, char *str, int len) in json_escape_str() argument
106 c = str[pos]; in json_escape_str()
118 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
135 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
145 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
534 if (json_parse_int64(jso->o.c_string.str, &cint64) != 0) in json_object_get_int()
582 if (json_parse_int64(jso->o.c_string.str, &cint) == 0) in json_object_get_int64()
689 cdouble = strtod(jso->o.c_string.str,&errPtr); in json_object_get_double()
692 if (errPtr == jso->o.c_string.str) in json_object_get_double()
732 json_escape_str(pb, jso->o.c_string.str, jso->o.c_string.len); in json_object_string_to_json_string()
[all …]
/device/google/bonito/json-c/
Djson_tokener.c159 struct json_object* json_tokener_parse(const char *str) in json_tokener_parse() argument
163 obj = json_tokener_parse_verbose(str, &jerr_ignored); in json_tokener_parse()
167 struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *error) in json_tokener_parse_verbose() argument
175 obj = json_tokener_parse_ex(tok, str, -1); in json_tokener_parse_verbose()
217 (((dest) = *str), 1) \
225 #define ADVANCE_CHAR(str, tok) \ argument
226 ( ++(str), ((tok)->char_offset)++, c)
233 const char *str, int len) in json_tokener_parse_ex() argument
253 if ((len < -1) || (len == -1 && strlen(str) > INT32_MAX)) { in json_tokener_parse_ex()
266 if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok))) in json_tokener_parse_ex()
[all …]
Djson_tokener.h80 char *str; member
125 extern struct json_object* json_tokener_parse(const char *str);
126 extern struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *err…
202 const char *str, int len);
Djson_object.c100 static int json_escape_str(struct printbuf *pb, char *str, int len) in json_escape_str() argument
106 c = str[pos]; in json_escape_str()
118 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
135 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
145 printbuf_memappend(pb, str + start_offset, pos - start_offset); in json_escape_str()
534 if (json_parse_int64(jso->o.c_string.str, &cint64) != 0) in json_object_get_int()
582 if (json_parse_int64(jso->o.c_string.str, &cint) == 0) in json_object_get_int64()
689 cdouble = strtod(jso->o.c_string.str,&errPtr); in json_object_get_double()
692 if (errPtr == jso->o.c_string.str) in json_object_get_double()
732 json_escape_str(pb, jso->o.c_string.str, jso->o.c_string.len); in json_object_string_to_json_string()
[all …]
/device/google/cuttlefish/host/commands/modem_simulator/
Dcommand_parser.cpp40 auto str = command_.substr(fpos + 1, (spos - fpos - 1)); in GetNextStr() local
43 return str; in GetNextStr()
53 auto str = command_.substr(0, pos); in GetNextStr() local
56 return str; in GetNextStr()
68 std::string str; in GetNextStrDeciToHex() local
75 return ss.str(); in GetNextStrDeciToHex()
/device/generic/goldfish-opengl/android-emu/android/base/
DStringView.h113 StringView(const std::string& str) : in StringView() argument
114 mString(str.c_str()), mSize(str.size()) {} in StringView()
116 constexpr StringView(const char* str, size_t len) in StringView() argument
117 : mString(str ? str : ""), mSize(len) {} in StringView()
125 std::string str() const { return std::string(mString, mString + mSize); } in str() function
152 void set(const char* str) { in set() argument
153 mString = str ? str : ""; in set()
278 mStringCopy.emplace(mStringView.str()); in get()
/device/generic/goldfish/tools/
Dmk_combined_img.py52 sizeByMb = str((1024 * 1024 - 1 + os.path.getsize(line[0])) / 1024 / 1024)
82 'ibs=1024k', 'obs=1024k', 'seek=' + str(offset)]
107 num = str(partition["num"])
122 type=str, help="input configuration file",
125 type=str, help="output filename",
167 … "bs=1024k", "conv=notrunc,sync", "seek=" + str(1 + int(partitions[0]["sizeByMb"]))])
170 … "seek=" + str(1 + int(partitions[0]["sizeByMb"]) + int(partitions[1]["sizeByMb"]))])
180 partition["start"] = str(offset // 512)
189 partition["end"] = str(offset // 512 - 1)
196 'conv=notrunc', 'bs=1024k', 'count=1', 'seek=' + str(offset)])
/device/generic/goldfish-opengl/android-emu/android/base/files/
DStream.cpp106 void Stream::putString(StringView str) { in putString() argument
107 this->putBe32(str.size()); in putString()
108 this->write(str.data(), str.size()); in putString()
111 void Stream::putString(const char* str) { in putString() argument
112 putString(StringView(str)); in putString()
115 void Stream::putString(const char* str, size_t len) { in putString() argument
116 putString(StringView(str, len)); in putString()
DStream.h80 void putString(StringView str);
83 void putString(const char* str);
87 void putString(const char* str, size_t strlen);
/device/google/cuttlefish/tools/
Dupload_to_gce_and_run.py63 type=str,
68 type=str,
72 '-instance', type=str, required=True,
75 '-zone', type=str, default=None,
78 '-user', type=str, default='vsoc-01',
81 '-data-image', type=str, default=None,
Dupload_via_ssh.py60 type=str,
65 type=str,
69 '-user', type=str, default='vsoc-01',
72 '-ip', type=str,
/device/sample/frameworks/PlatformLibrary/jni/
DPlatformLibrary.cpp100 jstring str) { in PlatformLibrary_reverseString() argument
102 if (str == NULL) { in PlatformLibrary_reverseString()
112 const jchar* strChars = env->GetStringChars(str, NULL); in PlatformLibrary_reverseString()
118 jsize strLength = env->GetStringLength(str); in PlatformLibrary_reverseString()
124 const char* printable = env->GetStringUTFChars(str, NULL); in PlatformLibrary_reverseString()
127 env->ReleaseStringUTFChars(str, printable); in PlatformLibrary_reverseString()
142 env->ReleaseStringChars(str, strChars); in PlatformLibrary_reverseString()
/device/google/cuttlefish/host/frontend/gcastv2/signaling_server/
Dserver_config.cpp33 for (const auto& str : stun_servers_) { in ToJson() local
36 urls.append(StartsWith(str, kStunPrefix)? str: kStunPrefix + str); in ToJson()
/device/google/crosshatch/audio/
Dconvert_config_string.py178 fileo.write(str(binarydata[i])+', ')
180 fileo.write(str(binarydata[len(binarydata)-1])+'\n\n\n\n')
185 fileo.write(str(binarydata1[i])+', ')
187 fileo.write(str(binarydata1[len(binarydata1)-1])+'\n\n\n\n')
265 fileo.write(str(RX[i])+', ')
267 fileo.write(str(RX[len(RX)-1])+'\n\n\n\n')
273 fileo.write(str(TX[i])+', ')
275 fileo.write(str(TX[len(TX)-1])+'\n\n\n\n')
/device/google/bonito/audio/
Dconvert_config_string.py178 fileo.write(str(binarydata[i])+', ')
180 fileo.write(str(binarydata[len(binarydata)-1])+'\n\n\n\n')
185 fileo.write(str(binarydata1[i])+', ')
187 fileo.write(str(binarydata1[len(binarydata1)-1])+'\n\n\n\n')
265 fileo.write(str(RX[i])+', ')
267 fileo.write(str(RX[len(RX)-1])+'\n\n\n\n')
273 fileo.write(str(TX[i])+', ')
275 fileo.write(str(TX[len(TX)-1])+'\n\n\n\n')

123456