Home
last modified time | relevance | path

Searched refs:aString (Results 1 – 25 of 36) sorted by relevance

12

/openthread-3.6.0/src/core/common/
Dstring.cpp53 MatchType Match(const char *aString, const char *aPrefixString, StringMatchMode aMode) in Match() argument
70 VerifyOrExit(*aString++ == *aPrefixString++); in Match()
77 VerifyOrExit(ToLowercase(*aString++) == ToLowercase(*aPrefixString++)); in Match()
82 match = (*aString == kNullChar) ? kFullMatch : kPrefixMatch; in Match()
90 uint16_t StringLength(const char *aString, uint16_t aMaxLength) in StringLength() argument
94 for (ret = 0; (ret < aMaxLength) && (aString[ret] != kNullChar); ret++) in StringLength()
102 const char *StringFind(const char *aString, char aChar) in StringFind() argument
106 for (; *aString != kNullChar; aString++) in StringFind()
108 if (*aString == aChar) in StringFind()
110 ret = aString; in StringFind()
[all …]
Dheap_string.hpp73 String(String &&aString) in String() argument
74 : mStringBuffer(aString.mStringBuffer) in String()
76 aString.mStringBuffer = nullptr; in String()
123 Error Set(const String &aString) { return Set(aString.AsCString()); } in Set() argument
134 Error Set(String &&aString);
176 bool operator==(const String &aString) const { return (*this == aString.AsCString()); } in operator ==()
Dstring.hpp92 uint16_t StringLength(const char *aString, uint16_t aMaxLength);
103 const char *StringFind(const char *aString, char aChar);
116 const char *StringFind(const char *aString, const char *aSubString, StringMatchMode aMode = kString…
129 bool StringStartsWith(const char *aString, const char *aPrefixString, StringMatchMode aMode = kStri…
141 bool StringEndsWith(const char *aString, char aChar);
154 bool StringEndsWith(const char *aString, const char *aSubString, StringMatchMode aMode = kStringExa…
224 Error StringParseUint8(const char *&aString, uint8_t &aUint8, uint8_t aMaxValue);
243 Error StringParseUint8(const char *&aString, uint8_t &aUint8);
251 void StringConvertToLowercase(char *aString);
259 void StringConvertToUppercase(char *aString);
[all …]
Dheap_string.cpp69 Error String::Set(String &&aString) in Set() argument
71 VerifyOrExit(mStringBuffer != aString.mStringBuffer); in Set()
74 mStringBuffer = aString.mStringBuffer; in Set()
75 aString.mStringBuffer = nullptr; in Set()
/openthread-3.6.0/src/core/utils/
Dparse_cmdline.cpp120 template <typename UintType> Error ParseUint(const char *aString, UintType &aUint) in ParseUint() argument
125 SuccessOrExit(error = ParseAsUint64(aString, value)); in ParseUint()
134 Error ParseAsUint8(const char *aString, uint8_t &aUint8) { return ParseUint<uint8_t>(aString, aUint… in ParseAsUint8() argument
136 Error ParseAsUint16(const char *aString, uint16_t &aUint16) { return ParseUint<uint16_t>(aString, a… in ParseAsUint16() argument
138 Error ParseAsUint32(const char *aString, uint32_t &aUint32) { return ParseUint<uint32_t>(aString, a… in ParseAsUint32() argument
140 Error ParseAsUint64(const char *aString, uint64_t &aUint64) in ParseAsUint64() argument
144 const char *cur = aString; in ParseAsUint64()
153 VerifyOrExit(aString != nullptr, error = kErrorInvalidArgs); in ParseAsUint64()
181 template <typename IntType> Error ParseInt(const char *aString, IntType &aInt) in ParseInt() argument
186 SuccessOrExit(error = ParseAsInt32(aString, value)); in ParseInt()
[all …]
Dparse_cmdline.hpp70 otError ParseAsUint8(const char *aString, uint8_t &aUint8);
84 otError ParseAsUint16(const char *aString, uint16_t &aUint16);
98 otError ParseAsUint32(const char *aString, uint32_t &aUint32);
112 otError ParseAsUint64(const char *aString, uint64_t &aUint64);
127 otError ParseAsInt8(const char *aString, int8_t &aInt8);
142 otError ParseAsInt16(const char *aString, int16_t &aInt16);
157 otError ParseAsInt32(const char *aString, int32_t &aInt32);
171 otError ParseAsBool(const char *aString, bool &aBool);
185 otError ParseAsIp6Address(const char *aString, otIp6Address &aAddress);
197 otError ParseAsIp4Address(const char *aString, otIp4Address &aAddress);
[all …]
/openthread-3.6.0/src/core/net/
Dip6_address.cpp175 Error Prefix::FromString(const char *aString) in FromString() argument
183 VerifyOrExit(aString != nullptr); in FromString()
185 cur = StringFind(aString, kSlashChar); in FromString()
188 SuccessOrExit(AsCoreType(&mPrefix).ParseFrom(aString, kSlashChar)); in FromString()
539 Error Address::FromString(const char *aString) in FromString() argument
543 return ParseFrom(aString, kNullChar); in FromString()
546 Error Address::ParseFrom(const char *aString, char aTerminatorChar) in ParseFrom() argument
560 if (*aString == kColonChar) in ParseFrom()
562 aString++; in ParseFrom()
563 VerifyOrExit(*aString == kColonChar); in ParseFrom()
[all …]
Dip4_types.cpp42 Error Address::FromString(const char *aString, char aTerminatorChar) in FromString() argument
47 const char *cur = aString; in FromString()
136 Error Cidr::FromString(const char *aString) in FromString() argument
144 SuccessOrExit(AsCoreType(&mAddress).FromString(aString, kSlashChar)); in FromString()
146 cur = StringFind(aString, kSlashChar); in FromString()
Dip6_address.hpp331 Error FromString(const char *aString);
994 Error FromString(const char *aString);
1047 Error ParseFrom(const char *aString, char aTerminatorChar);
/openthread-3.6.0/tests/unit/
Dtest_heap_string.cpp42 void PrintString(const char *aName, const Heap::String &aString) in PrintString() argument
44 if (aString.IsNull()) in PrintString()
50 printf("%s = [%zu] \"%s\"\n", aName, strlen(aString.AsCString()), aString.AsCString()); in PrintString()
54 void VerifyString(const char *aName, const Heap::String &aString, const char *aExpectedString) in VerifyString() argument
56 PrintString(aName, aString); in VerifyString()
60 VerifyOrQuit(aString.IsNull()); in VerifyString()
61 VerifyOrQuit(aString.AsCString() == nullptr); in VerifyString()
62 VerifyOrQuit(aString != "something"); in VerifyString()
66 VerifyOrQuit(!aString.IsNull()); in VerifyString()
67 VerifyOrQuit(aString.AsCString() != nullptr); in VerifyString()
[all …]
/openthread-3.6.0/src/posix/platform/
Dconfig_file.cpp213 void ConfigFile::Strip(char *aString) const in Strip()
217 for (int i = 0; aString[i]; i++) in Strip()
219 if (aString[i] != ' ' && aString[i] != '\r' && aString[i] != '\n') in Strip()
221 aString[count++] = aString[i]; in Strip()
225 aString[count] = '\0'; in Strip()
Dconfiguration.hpp129 uint16_t StringToRegionCode(const char *aString) const in StringToRegionCode()
131 return static_cast<uint16_t>(((aString[0] & 0xFF) << 8) | ((aString[1] & 0xFF) << 0)); in StringToRegionCode()
Dpower.cpp49 otError TargetPower::FromString(char *aString) in FromString() argument
55 VerifyOrExit((str = strtok_r(aString, ",", &psave)) != nullptr, error = OT_ERROR_PARSE); in FromString()
98 otError CalibratedPower::FromString(char *aString) in FromString() argument
104 VerifyOrExit((str = strtok_r(aString, ",", &pSave)) != nullptr, error = OT_ERROR_PARSE); in FromString()
Dpower.hpp112 otError FromString(char *aString);
207 otError FromString(char *aString);
Dconfig_file.hpp120 void Strip(char *aString) const;
/openthread-3.6.0/src/core/api/
Ddiags_api.cpp45 otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOut… in otDiagProcessCmdLine() argument
47 AssertPointerIsNotNull(aString); in otDiagProcessCmdLine()
49 …return AsCoreType(aInstance).Get<FactoryDiags::Diags>().ProcessLine(aString, aOutput, aOutputMaxLe… in otDiagProcessCmdLine()
Dnat64_api.cpp143 otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress) in otIp4AddressFromString() argument
145 AssertPointerIsNotNull(aString); in otIp4AddressFromString()
146 return AsCoreType(aAddress).FromString(aString); in otIp4AddressFromString()
169 otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr) { return AsCoreType(aCidr).FromS… in otIp4CidrFromString() argument
Dip6_api.cpp196 otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress) in otIp6AddressFromString() argument
198 return AsCoreType(aAddress).FromString(aString); in otIp6AddressFromString()
201 otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix) in otIp6PrefixFromString() argument
203 return AsCoreType(aPrefix).FromString(aString); in otIp6PrefixFromString()
/openthread-3.6.0/src/cli/
Dcli_output.hpp67 constexpr static CommandId Cmd(const char *aString) in Cmd() argument
69 return (aString[0] == '\0') ? 0 : (static_cast<uint8_t>(aString[0]) + Cmd(aString + 1) * 255u); in Cmd()
Dcli_network_data.hpp121 static void PrefixFlagsToString(const otBorderRouterConfig &aConfig, FlagsString &aString);
130 static void RouteFlagsToString(const otExternalRouteConfig &aConfig, FlagsString &aString);
Dcli_network_data.cpp55 void NetworkData::PrefixFlagsToString(const otBorderRouterConfig &aConfig, FlagsString &aString) in PrefixFlagsToString() argument
57 char *flagsPtr = &aString[0]; in PrefixFlagsToString()
123 void NetworkData::RouteFlagsToString(const otExternalRouteConfig &aConfig, FlagsString &aString) in RouteFlagsToString() argument
125 char *flagsPtr = &aString[0]; in RouteFlagsToString()
/openthread-3.6.0/src/core/diags/
Dfactory_diags.hpp72 Error ProcessLine(const char *aString, char *aOutput, size_t aOutputMaxLen);
183 Error ParseCmd(char *aString, uint8_t &aArgsLength, char *aArgs[]);
207 static Error ParseLong(char *aString, long &aLong);
208 static Error ParseBool(char *aString, bool &aBool);
Dfactory_diags.cpp771 Error Diags::ParseLong(char *aString, long &aLong) in ParseLong() argument
774 aLong = strtol(aString, &endptr, 0); in ParseLong()
778 Error Diags::ParseBool(char *aString, bool &aBool) in ParseBool() argument
783 SuccessOrExit(error = ParseLong(aString, value)); in ParseBool()
791 Error Diags::ParseCmd(char *aString, uint8_t &aArgsLength, char *aArgs[]) in ParseCmd() argument
796 SuccessOrExit(error = Utils::CmdLineParser::ParseCmd(aString, args)); in ParseCmd()
804 Error Diags::ProcessLine(const char *aString, char *aOutput, size_t aOutputMaxLen) in ProcessLine() argument
813 … VerifyOrExit(StringLength(aString, kMaxCommandBuffer) < kMaxCommandBuffer, error = kErrorNoBufs); in ProcessLine()
815 strcpy(buffer, aString); in ProcessLine()
/openthread-3.6.0/include/openthread/
Dnat64.h448 otError otIp4CidrFromString(const char *aString, otIp4Cidr *aCidr);
476 otError otIp4AddressFromString(const char *aString, otIp4Address *aAddress);
Ddiag.h94 otError otDiagProcessCmdLine(otInstance *aInstance, const char *aString, char *aOutput, size_t aOut…

12