repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / webpositive / support / BaseURL.cpp
blob4d2f47cd29a9e5363b3c8fdeac3be6b12d3d9e84
1 /*
2 * Copyright 2010 Stephan Aßmus <superstippi@gmx.de>
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
6 #include "BaseURL.h"
9 BString
10 baseURL(const BString string)
12 int32 baseURLStart = string.FindFirst("://") + 3;
13 int32 baseURLEnd = string.FindFirst("/", baseURLStart + 1);
14 BString result;
15 result.SetTo(string.String() + baseURLStart, baseURLEnd - baseURLStart);
16 return result;