/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// maybe there are more than one separator at end // so we run in a loop while ((pstrPath->length > 1) && (pstrPath->buffer[pstrPath->length - 1] == FPH_CHAR_PATH_SEPARATOR))
{
pstrPath->length--;
pstrPath->buffer[pstrPath->length] = '\0';
}
/** Simple iterator for a path list separated by the specified character
*/ class path_list_iterator
{ public:
/* after construction get_current_item returns the first path in list, no need to call reset first
*/
path_list_iterator(OUString path_list, sal_Unicode list_separator = FPH_CHAR_COLON) :
m_path_list(std::move(path_list)),
m_end(m_path_list.getStr() + m_path_list.getLength() + 1),
m_separator(list_separator)
{
reset();
}
private: /* move m_path_end to the next separator or to the end of the string
*/ void advance()
{ while (!done() && *m_path_segment_end && (*m_path_segment_end != m_separator))
++m_path_segment_end;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.