4#include "Stroika/Frameworks/StroikaPreComp.h"
6#include "Stroika/Foundation/Characters/FloatConversion.h"
9#include "Stroika/Foundation/Containers/Collection.h"
10#include "Stroika/Foundation/Containers/Set.h"
21using namespace StroikaSample::WebServices;
22using namespace StroikaSample::WebServices::Model;
32 if (obj->real () != 0) {
33 if (obj->imag () == 0) {
38 if (obj->imag () != 0) {
39 if (not sb.
empty ()) {
42 if (obj->imag () > 0 and sb.
length () > 1) {
45 if (obj->imag () == 1) {
48 else if (obj->imag () == -1) {
68 for (
unsigned int cnt = 0; cnt < 2 and not remainingNumber2Parse.empty (); ++cnt) {
70 if (remainingNumber2Parse.
StartsWith (
"i"_k)) {
71 remainingNumber2Parse =
"1i"_k + remainingNumber2Parse.
Skip (1);
73 else if (remainingNumber2Parse.
StartsWith (
"+i"_k)) {
74 remainingNumber2Parse =
"+1i"_k + remainingNumber2Parse.
Skip (2);
76 else if (remainingNumber2Parse.
StartsWith (
"-i"_k)) {
77 remainingNumber2Parse =
"-1i"_k + remainingNumber2Parse.
Skip (2);
79 Number::value_type d = Characters::FloatConversion::ToFloat<Number::value_type> (remainingNumber2Parse, &remainingNumber2Parse);
80 if (remainingNumber2Parse.
StartsWith (
"i"_k)) {
81 accum += Number{0, d};
82 remainingNumber2Parse = remainingNumber2Parse.
Skip (1);
88 if (not remainingNumber2Parse.empty ()) {
Similar to String, but intended to more efficiently construct a String. Mutable type (String is large...
nonvirtual size_t length() const noexcept
number of characters, not bytes or code-points
nonvirtual bool empty() const noexcept
nonvirtual String str() const
String is like std::u32string, except it is much easier to use, often much more space efficient,...
nonvirtual String ReplaceAll(const RegularExpression ®Ex, const String &with) const
nonvirtual bool StartsWith(const Character &c, CompareOptions co=eWithCase) const
nonvirtual String Skip(size_t n) const
Return a substring of this string, starting at 'argument' n. If n > size(), return empty string.
A Collection<T> is a container to manage an un-ordered collection of items, without equality defined ...
ObjectVariantMapper can be used to map C++ types to and from variant-union types, which can be transp...
nonvirtual void AddCommonType(ARGS &&... args)
nonvirtual void Add(const TypeMappingDetails &s)
Simple variant-value (case variant union) object, with (variant) basic types analogous to a value in ...
Exception<> is a replacement (subclass) for any std c++ exception class (e.g. the default 'std::excep...
STRING_TYPE ToString(FLOAT_TYPE f, const ToStringOptions &options={})