Lines Matching defs:self
28 * @param self: self pointer.
32 bool StringAppendPointer(HcString *self, const char *str)
34 if (self != NULL && str != NULL) {
36 ParcelPopBack(&self->parcel, STRING_END_CHAR_LENGTH);
38 return ParcelWrite(&self->parcel, (void *)str, strlen(str) + 1);
47 * @param self: self pointer.
51 bool StringSetPointer(HcString *self, const char *str)
53 if (self != NULL) {
54 DeleteParcel(&self->parcel);
55 return StringAppendPointer(self, str);
64 * @param self: self pointer.
69 bool StringSetPointerWithLength(HcString* self, const char *str, uint32_t len)
71 if (self == NULL || str == NULL) {
78 DeleteParcel(&self->parcel);
80 if (false == ParcelWrite(&self->parcel, str, len)) {
84 return ParcelWriteInt8(&self->parcel, (uint32_t)STRING_END_CHAR);
89 * @param self: self pointer.
92 const char *StringGet(const HcString *self)
94 if (self == NULL) {
98 return GetParcelData(&self->parcel);
103 * @param self: self pointer.
106 uint32_t StringLength(const HcString *self)
108 if (self == NULL) {
111 uint32_t length = GetParcelDataSize(&self->parcel);
122 * @param self: self pointer.
127 int StringFind(const HcString *self, char c, uint32_t begin)
129 if (self == NULL) {
135 uint32_t strLen = StringLength(self);
140 const char* curChar = StringGet(self);
152 * @param self: self pointer.
158 bool StringSubString(const HcString *self, uint32_t begin, uint32_t len, HcString* dst)
160 if (self == NULL || dst == NULL) {
166 const char* beingPointer = StringGet(self) + begin;
172 * @param self: self pointer.
175 * -1: self is smaller than dst
176 * 0: self is equal with dst
177 * 1: self is bigger than dst
179 int StringCompare(const HcString *self, const char* dst)
181 if (self == NULL || dst == NULL) {
185 const char* src = StringGet(self);