Switch GetWallClockTime to using vectors for input and output.
[chromium-blink-merge.git] / remoting / signaling / jid_util.cc
blob8e8e12bb8788da5d03eb93f8046d190907c03caf
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "remoting/signaling/jid_util.h"
7 #include "base/strings/string_util.h"
9 namespace remoting {
11 std::string NormalizeJid(const std::string& jid) {
12 size_t slash_pos = jid.find('/');
14 // In case there the jid doesn't have resource id covert the whole value to
15 // lower-case.
16 if (slash_pos == std::string::npos)
17 return base::StringToLowerASCII(jid);
19 return base::StringToLowerASCII(jid.substr(0, slash_pos)) +
20 jid.substr(slash_pos);
23 } // namespace remoting