Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netrunner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sharinigma
netrunner
Commits
ab261442
Commit
ab261442
authored
7 years ago
by
Odilitime
Browse files
Options
Downloads
Patches
Plain Diff
getProtocolFromURL => getSchemeFromURL
parent
cf45df19
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/StringUtils.cpp
+2
-2
2 additions, 2 deletions
src/StringUtils.cpp
src/StringUtils.h
+3
-2
3 additions, 2 deletions
src/StringUtils.h
with
5 additions
and
4 deletions
src/StringUtils.cpp
+
2
−
2
View file @
ab261442
...
...
@@ -57,11 +57,11 @@ const std::string getHostFromURL(const std::string &url) {
}
/**
* get
protocol
from a url
* get
scheme
from a url
* @param url url string
* @return '' or a string with the found protocol
*/
const
std
::
string
get
Protocol
FromURL
(
const
std
::
string
&
url
)
{
const
std
::
string
get
Scheme
FromURL
(
const
std
::
string
&
url
)
{
auto
colonDoubleSlash
=
url
.
find
(
"://"
);
if
(
colonDoubleSlash
!=
std
::
string
::
npos
)
{
return
url
.
substr
(
0
,
colonDoubleSlash
);
...
...
This diff is collapsed.
Click to expand it.
src/StringUtils.h
+
3
−
2
View file @
ab261442
...
...
@@ -2,11 +2,12 @@
#define STRINGUTILS_H
#include
<string>
const
std
::
string
toLowercase
(
const
std
::
string
&
str
);
// should be moved to URL
const
std
::
string
getFilenameExtension
(
std
::
string
const
&
fileName
);
const
std
::
string
getDocumentFromURL
(
const
std
::
string
&
url
);
const
std
::
string
getHostFromURL
(
const
std
::
string
&
url
);
const
std
::
string
getProtocolFromURL
(
const
std
::
string
&
url
);
const
std
::
string
toLowercase
(
const
std
::
string
&
str
);
const
std
::
string
getSchemeFromURL
(
const
std
::
string
&
url
);
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment