Home | History | Annotate | Download | only in platform

Lines Matching refs:Length

26 #include "Length.h"
37 static Length parseLength(const UChar* data, unsigned length)
39 if (length == 0)
40 return Length(1, Relative);
43 while (i < length && isSpaceOrNewline(data[i]))
45 if (i < length && (data[i] == '+' || data[i] == '-'))
47 while (i < length && isASCIIDigit(data[i]))
50 while (i < length && (isASCIIDigit(data[i]) || data[i] == '.'))
55 while (i < length && isSpaceOrNewline(data[i]))
59 UChar next = (i < length) ? data[i] : ' ';
64 return Length(r, Percent);
65 return Length(1, Relative);
70 return Length(r, Relative);
71 return Length(1, Relative);
74 return Length(r, Fixed);
75 return Length(0, Relative);
78 static int countCharacter(const UChar* data, unsigned length, UChar character)
81 for (int i = 0; i < static_cast<int>(length); ++i)
86 Length* newCoordsArray(const String& string, int& len)
88 unsigned length = string.length();
90 StringBuffer spacified(length);
91 for (unsigned i = 0; i < length; i++) {
102 len = countCharacter(str->characters(), str->length(), ' ') + 1;
103 Length* r = new Length[len];
113 r[i] = parseLength(str->characters() + pos, str->length() - pos);
120 Length* newLengthArray(const String& string, int& len)
123 if (!str->length()) {
128 len = countCharacter(str->characters(), str->length(), ',') + 1;
129 Length* r = new Length[len];
143 if (str->length()-pos > 0)
144 r[i] = parseLength(str->characters() + pos, str->length() - pos);