Example #1
0
bool URL::isProbablyAnEmailAddress (const String& possibleEmailAddress)
{
    auto atSign = possibleEmailAddress.indexOfChar ('@');

    return atSign > 0
        && possibleEmailAddress.lastIndexOfChar ('.') > (atSign + 1)
        && ! possibleEmailAddress.endsWithChar ('.');
}
Example #2
0
static void addFileWithGroups (Project::Item& group, const RelativePath& file, const String& path)
{
    const int slash = path.indexOfChar (File::separator);

    if (slash >= 0)
    {
        const String topLevelGroup (path.substring (0, slash));
        const String remainingPath (path.substring (slash + 1));

        Project::Item newGroup (group.getOrCreateSubGroup (topLevelGroup));
        addFileWithGroups (newGroup, file, remainingPath);
    }
    else
    {
        if (! group.containsChildForFile (file))
            group.addRelativeFile (file, -1, false);
    }
}
Example #3
0
Font Font::fromString (const String& fontDescription)
{
    const int separator = fontDescription.indexOfChar (';');
    String name;

    if (separator > 0)
        name = fontDescription.substring (0, separator).trim();

    if (name.isEmpty())
        name = getDefaultSansSerifFontName();

    String sizeAndStyle (fontDescription.substring (separator + 1).trimStart());

    float height = sizeAndStyle.getFloatValue();
    if (height <= 0)
        height = 10.0f;

    const String style (sizeAndStyle.fromFirstOccurrenceOf (" ", false, false));

    return Font (name, style, height);
}
Example #4
0
//==============================================================================
String File::parseAbsolutePath (const String& p)
{
    if (p.isEmpty())
        return String::empty;

#if JUCE_WINDOWS
    // Windows..
    String path (p.replaceCharacter ('/', '\\'));

    if (path.startsWithChar (separator))
    {
        if (path[1] != separator)
        {
            /*  When you supply a raw string to the File object constructor, it must be an absolute path.
                If you're trying to parse a string that may be either a relative path or an absolute path,
                you MUST provide a context against which the partial path can be evaluated - you can do
                this by simply using File::getChildFile() instead of the File constructor. E.g. saying
                "File::getCurrentWorkingDirectory().getChildFile (myUnknownPath)" would return an absolute
                path if that's what was supplied, or would evaluate a partial path relative to the CWD.
            */
            jassertfalse;

            path = File::getCurrentWorkingDirectory().getFullPathName().substring (0, 2) + path;
        }
    }
    else if (! path.containsChar (':'))
    {
        /*  When you supply a raw string to the File object constructor, it must be an absolute path.
            If you're trying to parse a string that may be either a relative path or an absolute path,
            you MUST provide a context against which the partial path can be evaluated - you can do
            this by simply using File::getChildFile() instead of the File constructor. E.g. saying
            "File::getCurrentWorkingDirectory().getChildFile (myUnknownPath)" would return an absolute
            path if that's what was supplied, or would evaluate a partial path relative to the CWD.
        */
        jassertfalse;

        return File::getCurrentWorkingDirectory().getChildFile (path).getFullPathName();
    }
#else
    // Mac or Linux..

    // Yes, I know it's legal for a unix pathname to contain a backslash, but this assertion is here
    // to catch anyone who's trying to run code that was written on Windows with hard-coded path names.
    // If that's why you've ended up here, use File::getChildFile() to build your paths instead.
    jassert ((! p.containsChar ('\\')) || (p.indexOfChar ('/') >= 0 && p.indexOfChar ('/') < p.indexOfChar ('\\')));

    String path (p);

    if (path.startsWithChar ('~'))
    {
        if (path[1] == separator || path[1] == 0)
        {
            // expand a name of the form "~/abc"
            path = File::getSpecialLocation (File::userHomeDirectory).getFullPathName()
                    + path.substring (1);
        }
        else
        {
            // expand a name of type "~dave/abc"
            const String userName (path.substring (1).upToFirstOccurrenceOf ("/", false, false));

            if (struct passwd* const pw = getpwnam (userName.toUTF8()))
                path = addTrailingSeparator (pw->pw_dir) + path.fromFirstOccurrenceOf ("/", false, false);
        }
    }
    else if (! path.startsWithChar (separator))
    {
       #if JUCE_DEBUG || JUCE_LOG_ASSERTIONS
        if (! (path.startsWith ("./") || path.startsWith ("../")))
        {
            /*  When you supply a raw string to the File object constructor, it must be an absolute path.
                If you're trying to parse a string that may be either a relative path or an absolute path,
                you MUST provide a context against which the partial path can be evaluated - you can do
                this by simply using File::getChildFile() instead of the File constructor. E.g. saying
                "File::getCurrentWorkingDirectory().getChildFile (myUnknownPath)" would return an absolute
                path if that's what was supplied, or would evaluate a partial path relative to the CWD.
            */
            jassertfalse;

           #if JUCE_LOG_ASSERTIONS
            Logger::writeToLog ("Illegal absolute path: " + path);
           #endif
        }
       #endif

        return File::getCurrentWorkingDirectory().getChildFile (path).getFullPathName();
    }
#endif

    while (path.endsWithChar (separator) && path != separatorString) // careful not to turn a single "/" into an empty string.
        path = path.dropLastCharacters (1);

    return path;
}
Example #5
0
String XmlDocument::expandExternalEntity (const String& entity)
{
    if (needToLoadDTD)
    {
        if (dtdText.isNotEmpty())
        {
            dtdText = dtdText.trimCharactersAtEnd (">");
            tokenisedDTD.addTokens (dtdText, true);

            if (tokenisedDTD [tokenisedDTD.size() - 2].equalsIgnoreCase ("system")
                    && tokenisedDTD [tokenisedDTD.size() - 1].isQuotedString())
            {
                const String fn (tokenisedDTD [tokenisedDTD.size() - 1]);

                tokenisedDTD.clear();
                tokenisedDTD.addTokens (getFileContents (fn), true);
            }
            else
            {
                tokenisedDTD.clear();
                const int openBracket = dtdText.indexOfChar ('[');

                if (openBracket > 0)
                {
                    const int closeBracket = dtdText.lastIndexOfChar (']');

                    if (closeBracket > openBracket)
                        tokenisedDTD.addTokens (dtdText.substring (openBracket + 1,
                                                closeBracket), true);
                }
            }

            for (int i = tokenisedDTD.size(); --i >= 0;)
            {
                if (tokenisedDTD[i].startsWithChar ('%')
                        && tokenisedDTD[i].endsWithChar (';'))
                {
                    const String parsed (getParameterEntity (tokenisedDTD[i].substring (1, tokenisedDTD[i].length() - 1)));
                    StringArray newToks;
                    newToks.addTokens (parsed, true);

                    tokenisedDTD.remove (i);

                    for (int j = newToks.size(); --j >= 0;)
                        tokenisedDTD.insert (i, newToks[j]);
                }
            }
        }

        needToLoadDTD = false;
    }

    for (int i = 0; i < tokenisedDTD.size(); ++i)
    {
        if (tokenisedDTD[i] == entity)
        {
            if (tokenisedDTD[i - 1].equalsIgnoreCase ("<!entity"))
            {
                String ent (tokenisedDTD [i + 1].trimCharactersAtEnd (">").trim().unquoted());

                // check for sub-entities..
                int ampersand = ent.indexOfChar ('&');

                while (ampersand >= 0)
                {
                    const int semiColon = ent.indexOf (i + 1, ";");

                    if (semiColon < 0)
                    {
                        setLastError ("entity without terminating semi-colon", false);
                        break;
                    }

                    const String resolved (expandEntity (ent.substring (i + 1, semiColon)));

                    ent = ent.substring (0, ampersand)
                          + resolved
                          + ent.substring (semiColon + 1);

                    ampersand = ent.indexOfChar (semiColon + 1, '&');
                }

                return ent;
            }
        }
    }

    setLastError ("unknown entity", true);

    return entity;
}
Example #6
0
  ParsedInclude parseInclude (String const& line, String const& trimmed)
  {
    ParsedInclude parsed;

    if (trimmed.startsWithChar ('#'))
    {
      const String removed = trimmed.removeCharacters (" \t");

      if (removed.startsWithIgnoreCase ("#include\""))
      {
        parsed.endOfInclude = line.indexOfChar (line.indexOfChar ('\"') + 1, '\"') + 1;
        parsed.filename = line.fromFirstOccurrenceOf ("\"", false, false)
                              .upToLastOccurrenceOf ("\"", false, false);

        parsed.isIncludeLine = true;

        parsed.preventReinclude = m_preventReincludes.contains (parsed.filename);
        parsed.forceReinclude = m_forceReincludes.contains (parsed.filename);
      }
      else if (removed.startsWithIgnoreCase ("#include<"))
      {
        if (m_checkSystemIncludes) {
          parsed.endOfInclude = line.indexOfChar (line.indexOfChar ('<') + 1, '>') + 1;
          parsed.filename = line.fromFirstOccurrenceOf ("<", false, false)
                                .upToLastOccurrenceOf (">", false, false);
          parsed.isIncludeLine = true;

          parsed.preventReinclude = m_preventReincludes.contains (parsed.filename);
          parsed.forceReinclude = m_forceReincludes.contains (parsed.filename);
        }
      }
      else if (removed.startsWithIgnoreCase ("#include"))
      {
        String name;

#if 1 
        if (line.contains ("/*"))
          name = line.fromFirstOccurrenceOf ("#include", false, false)
                     .upToFirstOccurrenceOf ("/*", false, false).trim ();
        else
          name = line.fromFirstOccurrenceOf ("#include", false, false).trim ();

        parsed.endOfInclude = line.upToFirstOccurrenceOf (name, true, false).length ();
#else
        name = line.fromFirstOccurrenceOf ("#include", false, false).trim ();
#endif

        String value = m_macrosDefined [name];

        if (m_verbose)
          std::cout << "name = " << name << "\n";

        if (value.startsWithIgnoreCase ("\""))
        {
          parsed.endOfInclude = line.trimEnd().length () + 1;
          parsed.filename = value.fromFirstOccurrenceOf ("\"", false, false)
                                .upToLastOccurrenceOf ("\"", false, false);

          parsed.isIncludeLine = true;
        }
        else if (value.startsWithIgnoreCase ("<") && m_checkSystemIncludes)
        {
          parsed.endOfInclude = line.trimEnd().length () + 1;
          parsed.filename = value.fromFirstOccurrenceOf ("<", false, false)
                                .upToLastOccurrenceOf (">", false, false);
          parsed.isIncludeLine = true;
        }

        parsed.preventReinclude = parsed.isIncludeLine && m_preventReincludes.contains (name);
        parsed.forceReinclude = parsed.isIncludeLine && m_forceReincludes.contains (name);
      }
    }

    return parsed;
  }
Example #7
0
void Blender::actionListenerCallback(const String &message)
{
    int mixer_id = 0;
    int channel_id = 0;
    int mixer_id_index = message.indexOfChar(':') + 1;
    int channel_id_index = message.indexOfChar('+') + 1;
    String idStr(String::empty);
    String type(message.upToFirstOccurrenceOf(":", false, false));
    String valStr(message.fromLastOccurrenceOf("=", false, false));
    uint32 value = valStr.getIntValue();
    bool bUpdateGui = false;

    if (mixer_id_index >= 0)
    {
        idStr = message.substring(mixer_id_index, mixer_id_index+2);
        mixer_id = idStr.getIntValue();

        if (channel_id_index >= 0)
        {
            idStr = message.substring(channel_id_index, channel_id_index+2);
            channel_id = idStr.getIntValue();

            if (0 == type.compare("gain"))
            {
                int gain = jmin<int>(130, (int)value);
                m_bl_desc.mixer[mixer_id].channel[channel_id].gain = gain;
                m_bl_desc.mixer[mixer_id].channel[channel_id].gain_dbv = m_dBvMap[gain];
            }
            else if (0 == type.compare("master_gain"))
            {
                // master gain
                int gain = jmin<int>(130, (int)value);
                m_bl_desc.mixer[mixer_id].master.gain = gain;
                m_bl_desc.mixer[mixer_id].master.gain_dbv = m_dBvMap[gain];
            }
            else if (0 == type.compare("pan"))
            {
                // channel strip pan
                m_bl_desc.mixer[mixer_id].channel[channel_id].pan = (int)value;
            }
            else if (0 == type.compare("master_mute"))
            {
                // master out mute
                m_bl_desc.mixer[mixer_id].master.muting = (value != 0);
            }
            else if (0 == type.compare("mute"))
            {
                uint32 muting = (uint32)value;
                uint32 channel_bit = 1<<channel_id;

                // channel strip mute
                if (muting)
                {
                    // mute
                    m_bl_desc.mixer[mixer_id].mutes |= channel_bit;
                    m_bl_desc.mixer[mixer_id].was_muted |= channel_bit;

                    // handle solos
                    if (0 != m_bl_desc.mixer[mixer_id].solos)
                    {
                        if (m_bl_desc.mixer[mixer_id].solos == channel_bit)
                        {
                            // a solo was active only on that channel, unsolo all and restore mutes
                            m_bl_desc.mixer[mixer_id].solos = 0;
                            m_bl_desc.mixer[mixer_id].mutes = m_bl_desc.mixer[mixer_id].was_muted;
                            bUpdateGui = true;
                        }
                        // other solos are active, unsolo only this one if soloed
                        else if (m_bl_desc.mixer[mixer_id].solos & channel_bit)
                        {
                            m_bl_desc.mixer[mixer_id].solos ^= channel_bit;
                            m_bl_desc.mixer[mixer_id].mutes |= (m_bl_desc.mixer[mixer_id].was_muted & channel_id);
                            bUpdateGui = true;
                        }
                    }
                }
                else
                {
                    // unmute
                    m_bl_desc.mixer[mixer_id].mutes ^= channel_bit;
                    m_bl_desc.mixer[mixer_id].was_muted ^= channel_bit;

                    // handle solos
                    if (0 != m_bl_desc.mixer[mixer_id].solos)
                    {
                        // a solo was active on another channel, solo this one too
                        m_bl_desc.mixer[mixer_id].solos |= channel_bit;
                        bUpdateGui = true;
                    }
                }
            }
            else if (0 == type.compare("solo"))
            {
                uint32 soloing = (uint32)value;
                uint32 channel_bit = 1<<channel_id;

                if (soloing)
                {
                    // is this the first soloed channel?
                    if (0 == m_bl_desc.mixer[mixer_id].solos)
                    {
                        // solo
                        m_bl_desc.mixer[mixer_id].solos |= channel_bit;

                        // mute all others
                        m_bl_desc.mixer[mixer_id].mutes = ~channel_bit;
                        bUpdateGui = true;
                    }
                    else
                    {
                        // solo this one also
                        m_bl_desc.mixer[mixer_id].solos |= channel_bit;
                        m_bl_desc.mixer[mixer_id].mutes ^= channel_bit;
                        bUpdateGui = true;
                    }
                }
                else
                {
                    // channel was soloed

                    // was this the only soloed channel?
                    if (m_bl_desc.mixer[mixer_id].solos == channel_bit)
                    {
                        // unsolo all
                        m_bl_desc.mixer[mixer_id].solos = 0;

                        // restore mute states
                        m_bl_desc.mixer[mixer_id].mutes = m_bl_desc.mixer[mixer_id].was_muted;
                        bUpdateGui = true;
                    }
                    else
                    {
                        // other channels are soloed, so unsolo this one only
                        m_bl_desc.mixer[mixer_id].solos ^= channel_bit;

                        // restore mute state
                        if (m_bl_desc.mixer[mixer_id].was_muted & channel_bit)
                        {
                            m_bl_desc.mixer[mixer_id].mutes |= channel_bit;
                        }
                        bUpdateGui = true;
                    }
                }

            }
            else if (0 == type.compare("dirout"))
            {
                m_bl_desc.mixer[mixer_id].direct_out = (0 != value);

                setDirectOut(mixer_id);
                sendDirout(mixer_id, m_bl_desc.mixer[mixer_id].direct_out);
                String msg(String::formatted("dirout: mixer id:%d, %d", mixer_id, m_bl_desc.mixer[mixer_id].direct_out));
                EventLogger::getInstance()->logMessage(msg);
            }
            else if (0 == type.compare("reset"))
            {
                for (int i=0; i<m_bl_desc.mixer[mixer_id].num_channels; i++)
                {
                    m_bl_desc.mixer[mixer_id].channel[i].gain = 101;
                    m_bl_desc.mixer[mixer_id].channel[i].gain_dbv = m_dBvMap[101];
                    sendChGain(mixer_id, i, 101);
                    m_bl_desc.mixer[mixer_id].channel[i].pan = 0;
                    sendChPan(mixer_id, i, 0);
                }
                m_bl_desc.mixer[mixer_id].mutes = 0;
                m_bl_desc.mixer[mixer_id].was_muted = 0;
                sendChMutes(mixer_id, m_bl_desc.mixer[mixer_id].mutes);
                m_bl_desc.mixer[mixer_id].solos = 0;
                sendChSolos(mixer_id, m_bl_desc.mixer[mixer_id].solos);

                m_bl_desc.mixer[mixer_id].master.gain = 101;
                m_bl_desc.mixer[mixer_id].master.gain_dbv = m_dBvMap[101];
                sendMasterGain(mixer_id, 101);
                m_bl_desc.mixer[mixer_id].master.muting = false;
                sendMasterMute(mixer_id, false);

                m_bl_desc.mixer[mixer_id].direct_out = 0;
                setDirectOut(mixer_id);
                sendDirout(mixer_id, 0);

                bUpdateGui = true;
            }
            // update mixer coeff's
            mixer_cfg(mixer_id);
        }

        if (bUpdateGui)
        {
            sendChMutes(mixer_id, m_bl_desc.mixer[mixer_id].mutes);
            sendChSolos(mixer_id, m_bl_desc.mixer[mixer_id].solos);
        }
    }
}
Example #8
0
 static int findStartOfPath (const String& url)
 {
     return url.indexOfChar (findStartOfNetLocation (url), '/') + 1;
 }
Example #9
0
bool CSPIniReadWrite::loadFromBuffer(byte* pBuffer, uint length)
{
	if (pBuffer)
	{
		delAllSections();

		uint i = 0;
		uint start = 0;
		uint end = 0;

		String strOneLine;				// 一行文本内容
		String strKey;					// 键名
		String strValue;				// 键值
		Section *myPG = nullptr;		// 段的iter
		int squarebrackets_left = -1;	// 左中括号的位置
		int squarebrackets_right = - 1;	// 右中括号的位置
		int equalsymbol = -1;			// 等号的位置

		//unicode16
		if (length >= 2 && pBuffer[0] == 0xFF && pBuffer[1] == 0xFE)
		{
			CharPointer_UTF16::CharType byTemp;
			CharPointer_UTF16::CharType* pTBuffer = (CharPointer_UTF16::CharType*)(pBuffer + 2);
			length = (length - 2)/2;
// 			i = 2;
// 			start = i;
			while (1)
			{
				byTemp = pTBuffer[i];
				if (byTemp != 0 && byTemp != L'\r' && byTemp != L'\n' && i < length)
				{
					i++;
				}
				else
				{
					end = i;
					if (start == end)
					{
						if (byTemp == 0 || i >= length)
						{
							break;
						}
						else
						{
							start = end + 1;
							i = start;
							continue;
						}
					}
					//处理一行数据
					strOneLine = String(CharPointer_UTF16(pTBuffer + start), CharPointer_UTF16(pTBuffer + end)).trim();

					// 判断是否是空行
					if (strOneLine.isEmpty())
					{
						if (byTemp == 0 || i >= length)
						{
							break;
						}
						else
						{
							start = end + 1;
							i = start;
							continue;
						}
					}

					squarebrackets_left = strOneLine.indexOfChar(L'[');
					squarebrackets_right = strOneLine.indexOfChar(L']');

					// 以下处理建
					if ((squarebrackets_left != -1) && (squarebrackets_right != -1) && (squarebrackets_left < squarebrackets_right))
					{
						int equalPos = strOneLine.indexOfChar(L'=');
						if (equalPos == -1 || (equalPos > squarebrackets_left && equalPos < squarebrackets_right))
						{
							strKey = strOneLine.substring(squarebrackets_left + 1, squarebrackets_right);

							myPG = new Section(strKey);
							m_ini.push_back(myPG);

							if (byTemp == 0 || i >= length)
							{
								break;
							}
							else
							{
								start = end + 1;
								i = start;
								continue;
							}
						}
					}

					// 以下处理key
					equalsymbol = strOneLine.indexOfChar(L'=');
					strKey = strOneLine.substring(0, equalsymbol).trim();	// 取得键名

					// 取得键值
					strValue = strOneLine.substring(equalsymbol + 1, strOneLine.length()).trim();

					m_ini.back()->m_tKeys.insert(pair_Key(strKey, strValue));


					if (byTemp == 0 || i >= length)
					{
						break;
					}
					start = end + 1;
					i = start;
				}
			}
		}
		//UTF8
		else if (length >= 3 && pBuffer[0] == 0xEF && pBuffer[1] == 0xBB && pBuffer[2] == 0xBF)
		{
			i = 3;// 要先减去标志位
			start = i;
			CharPointer_UTF8::CharType byTemp;

			while (1)
			{
				byTemp = pBuffer[i];
				if (byTemp != 0 && byTemp != '\r' && byTemp != '\n' && i < length)
				{
					i++;
				}
				else
				{
					end = i;
					if (start == end)
					{
						if (byTemp == 0 || i >= length)
						{
							break;
						}
						else
						{
							start = end + 1;
							i = start;
							continue;
						}
					}
					//处理一行数据
					strOneLine = String(CharPointer_UTF8((CharPointer_UTF8::CharType*)(pBuffer + start)),
						CharPointer_UTF8((CharPointer_UTF8::CharType*)(pBuffer + end))).trim();

					// 判断是否是空行
					if (strOneLine.isEmpty())
					{
						if (byTemp == 0 || i >= length)
						{
							break;
						}
						else
						{
							start = end + 1;
							i = start;
							continue;
						}
					}

					squarebrackets_left = strOneLine.indexOfChar(L'[');
					squarebrackets_right = strOneLine.indexOfChar(L']');

					// 以下处理建
					if ((squarebrackets_left != -1) && (squarebrackets_right != -1) && (squarebrackets_left < squarebrackets_right))
					{
						int equalPos = strOneLine.indexOfChar(L'=');
						if (equalPos == -1 || (equalPos > squarebrackets_left && equalPos < squarebrackets_right))
						{
							strKey = strOneLine.substring(squarebrackets_left + 1, squarebrackets_right);
							myPG = new Section(strKey);
							m_ini.push_back(myPG);

							if (byTemp == 0 || i >= length)
							{
								break;
							}
							else
							{
								start = end + 1;
								i = start;
								continue;
							}
						}
					}

					// 以下处理key
					equalsymbol = strOneLine.indexOfChar(L'=');

					strKey = strOneLine.substring(0, equalsymbol).trim();	// 取得键名

					// 取得键值
					strValue = strOneLine.substring(equalsymbol + 1, strOneLine.length()).trim();

					m_ini.back()->m_tKeys.insert(pair_Key(strKey, strValue));

					if (byTemp == 0 || i >= length)
					{
						break;
					}
					start = end + 1;
					i = start;
				}
			}
		}
		else
		{
			CharPointer_ASCII::CharType byTemp;

			while (1)
			{
				byTemp = pBuffer[i];
				if (byTemp != 0 && byTemp != '\r' && byTemp != '\n' && i < length)
				{
					i++;
				}
				else
				{
					end = i;
					if (start == end)
					{
						if (byTemp == 0 || i >= length)
						{
							break;
						}
						else
						{
							start = end + 1;
							i = start;
							continue;
						}
					}
					//处理一行数据
					strOneLine = String((CharPointer_ASCII::CharType*)(pBuffer + start), end - start).trim();

					// 判断是否是空行
					if (strOneLine.isEmpty())
					{
						if (byTemp == 0 || i >= length)
						{
							break;
						}
						else
						{
							start = end + 1;
							i = start;
							continue;
						}
					}

					squarebrackets_left = strOneLine.indexOfChar(L'[');
					squarebrackets_right = strOneLine.indexOfChar(L']');

					// 以下处理建
					if ((squarebrackets_left != -1) && (squarebrackets_right != -1) && (squarebrackets_left < squarebrackets_right))
					{
						int equalPos = strOneLine.indexOfChar(L'=');
						if (equalPos == -1 || (equalPos > squarebrackets_left && equalPos < squarebrackets_right))
						{
							strKey = strOneLine.substring(squarebrackets_left + 1, squarebrackets_right);
							myPG = new Section(strKey);
							m_ini.push_back(myPG);

							if (byTemp == 0 || i >= length)
							{
								break;
							}
							else
							{
								start = end + 1;
								i = start;
								continue;
							}
						}
					}

					// 以下处理key
					equalsymbol = strOneLine.indexOfChar(L'=');
					if (equalsymbol != -1)
					{
						strKey = strOneLine.substring(0, equalsymbol).trim();	// 取得键名

						// 取得键值
						strValue = strOneLine.substring(equalsymbol + 1, strOneLine.length()).trim();

						m_ini.back()->m_tKeys.insert(pair_Key(strKey, strValue));
					}

					if (byTemp == 0 || i >= length)
					{
						break;
					}
					start = end + 1;
					i = start;
				}
			}
		}

		return true; 
	}
	return false;
}