OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{Bonjour.cpp} Namespace Reference

Functions

std::string strip_service_dn (const std::string &service_name, const std::string &service_dn)

Function Documentation

◆ strip_service_dn()

std::string Slic3r::anonymous_namespace{Bonjour.cpp}::strip_service_dn ( const std::string & service_name,
const std::string & service_dn )
626{
627 if (service_name.size() <= service_dn.size()) {
628 return std::string();
629 }
630
631 auto needle = service_name.rfind(service_dn);
632 if (needle == service_name.size() - service_dn.size()) {
633 return service_name.substr(0, needle - 1);
634 } else {
635 return std::string();
636 }
637}

References strip_service_dn().

Referenced by strip_service_dn().

Here is the call graph for this function:
Here is the caller graph for this function: