Home
last modified time | relevance | path

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

12

/openthread-3.5.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.hpp82 uint16_t StringLength(const char *aString, uint16_t aMaxLength);
93 const char *StringFind(const char *aString, char aChar);
106 const char *StringFind(const char *aString, const char *aSubString, StringMatchMode aMode = kString…
119 bool StringStartsWith(const char *aString, const char *aPrefixString, StringMatchMode aMode = kStri…
131 bool StringEndsWith(const char *aString, char aChar);
144 bool StringEndsWith(const char *aString, const char *aSubString, StringMatchMode aMode = kStringExa…
177 Error StringParseUint8(const char *&aString, uint8_t &aUint8, uint8_t aMaxValue);
196 Error StringParseUint8(const char *&aString, uint8_t &aUint8);
204 void StringConvertToLowercase(char *aString);
212 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.5.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.5.0/src/core/net/
Dip6_address.cpp176 Error Prefix::FromString(const char *aString) in FromString() argument
184 VerifyOrExit(aString != nullptr); in FromString()
186 cur = StringFind(aString, kSlashChar); in FromString()
189 SuccessOrExit(AsCoreType(&mPrefix).ParseFrom(aString, kSlashChar)); in FromString()
536 Error Address::FromString(const char *aString) in FromString() argument
540 return ParseFrom(aString, kNullChar); in FromString()
543 Error Address::ParseFrom(const char *aString, char aTerminatorChar) in ParseFrom() argument
557 if (*aString == kColonChar) in ParseFrom()
559 aString++; in ParseFrom()
560 VerifyOrExit(*aString == kColonChar); in ParseFrom()
[all …]
Dip4_types.cpp40 Error Address::FromString(const char *aString, char aTerminatorChar) in FromString() argument
45 const char *cur = aString; in FromString()
134 Error Cidr::FromString(const char *aString) in FromString() argument
142 SuccessOrExit(AsCoreType(&mAddress).FromString(aString, kSlashChar)); in FromString()
144 cur = StringFind(aString, kSlashChar); in FromString()
Dip6_address.hpp333 Error FromString(const char *aString);
996 Error FromString(const char *aString);
1049 Error ParseFrom(const char *aString, char aTerminatorChar);
/openthread-3.5.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.5.0/src/posix/platform/
Dconfig_file.cpp200 void ConfigFile::Strip(char *aString) in Strip() argument
204 for (int i = 0; aString[i]; i++) in Strip()
206 if (aString[i] != ' ' && aString[i] != '\r' && aString[i] != '\n') in Strip()
208 aString[count++] = aString[i]; in Strip()
212 aString[count] = '\0'; in Strip()
Dpower_updater.hpp99 uint16_t StringToRegionCode(const char *aString) const in StringToRegionCode()
101 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
54 VerifyOrExit((str = strtok(aString, ",")) != nullptr, error = OT_ERROR_PARSE); in FromString()
97 otError CalibratedPower::FromString(char *aString) in FromString() argument
103 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.hpp99 void Strip(char *aString);
/openthread-3.5.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.cpp185 otError otIp6AddressFromString(const char *aString, otIp6Address *aAddress) in otIp6AddressFromString() argument
187 return AsCoreType(aAddress).FromString(aString); in otIp6AddressFromString()
190 otError otIp6PrefixFromString(const char *aString, otIp6Prefix *aPrefix) in otIp6PrefixFromString() argument
192 return AsCoreType(aPrefix).FromString(aString); in otIp6PrefixFromString()
/openthread-3.5.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.5.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.5.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