Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
john-maidbot committed Aug 12, 2023
1 parent 59d53d3 commit 93f2235
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions include/point_cloud_transport/point_cloud_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,45 +39,45 @@
namespace point_cloud_transport
{

/// @brief Remove the last copy of the given substring from the given string.
/// @param input original string
/// @param search substring to remove the last entry of
/// @return "input" with the last entry of "search" removed
/// \brief Remove the last copy of the given substring from the given string.
/// \param input original string
/// \param search substring to remove the last entry of
/// \return "input" with the last entry of "search" removed
POINT_CLOUD_TRANSPORT_PUBLIC
std::string erase_last_copy(const std::string & input, const std::string & search);

/// @brief Split a string into substrings using the given delimiter.
/// @param str string to split
/// @param delimiter delimiter to split on
/// @param maxSplits limit on the max number of splits to perform (-1 for unlimited splits)
/// @return vector of string tokens
/// \brief Split a string into substrings using the given delimiter.
/// \param str string to split
/// \param delimiter delimiter to split on
/// \param maxSplits limit on the max number of splits to perform (-1 for unlimited splits)
/// \return vector of string tokens
POINT_CLOUD_TRANSPORT_PUBLIC
std::vector<std::string> split(
const std::string & str, const std::string & delimiter,
int maxSplits = -1);

/// @brief Check if a string ends with a given suffix. (from cras::string_utils)
/// @param str string to check
/// @param suffix suffix to check for
/// @return true if "str" ends with "suffix", false otherwise
/// \brief Check if a string ends with a given suffix. (from cras::string_utils)
/// \param str string to check
/// \param suffix suffix to check for
/// \return true if "str" ends with "suffix", false otherwise
POINT_CLOUD_TRANSPORT_PUBLIC
bool endsWith(const std::string & str, const std::string & suffix);

/// @brief Remove a suffix from a string if it exists.
/// @param str string to remove suffix from
/// @param suffix suffix to remove
/// @param hadSuffix if non-null, set to true if "str" had "suffix" at the end
/// @return "str" with "suffix" removed
/// \brief Remove a suffix from a string if it exists.
/// \param str string to remove suffix from
/// \param suffix suffix to remove
/// \param hadSuffix if non-null, set to true if "str" had "suffix" at the end
/// \return "str" with "suffix" removed
POINT_CLOUD_TRANSPORT_PUBLIC
std::string removeSuffix(
const std::string & str, const std::string & suffix,
bool * hadSuffix = nullptr);

/// @brief Check if the given transport matches the given name.
/// @param lookup_name name of the transport to check
/// @param name name to check against
/// @param suffix suffix to remove from name before checking for equality
/// @return true if "lookup_name" matches "name" with "suffix" removed, false otherwise
/// \brief Check if the given transport matches the given name.
/// \param lookup_name name of the transport to check
/// \param name name to check against
/// \param suffix suffix to remove from name before checking for equality
/// \return true if "lookup_name" matches "name" with "suffix" removed, false otherwise
POINT_CLOUD_TRANSPORT_PUBLIC
bool transportNameMatches(
const std::string & lookup_name,
Expand Down

0 comments on commit 93f2235

Please sign in to comment.