FLUT_API std::pair< string, string > to_key_value( const string& s, const string& sep_char ) { auto pos = s.find_first_of( sep_char.c_str() ); if ( pos == string::npos ) return make_pair( trim_str( s ), string("") ); else return make_pair( trim_str( left_str( s, pos ) ), trim_str( mid_str( s, pos + 1 ) ) ); }
void WebRtcEndpointImpl::onIceCandidate (KmsIceCandidate *candidate) { try { std::string cand_str (kms_ice_candidate_get_candidate (candidate) ); std::string mid_str (kms_ice_candidate_get_sdp_mid (candidate) ); int sdp_m_line_index = kms_ice_candidate_get_sdp_m_line_index (candidate); std::shared_ptr <IceCandidate> cand ( new IceCandidate (cand_str, mid_str, sdp_m_line_index) ); OnIceCandidate event (shared_from_this(), OnIceCandidate::getName(), cand); signalOnIceCandidate (event); } catch (std::bad_weak_ptr &e) { } }
void string_compare(void) { int i; char sB[4]; z1 = (int)(z1 + 0.5); z2 = (int)(z2 + 0.5); s8 = ((z2 - 1) * 3) + ((z1 - 1) * 24) + 1; mid_str(sB, sQ, s8, 3); i = strncmp(sB, sA, 3); if (i == 0) z3 = 1; else z3 = 0; return; }