PhoenixGenerator  2.0.4
Set of tools to generate code
Loading...
Searching...
No Matches
gitlab_doc.h File Reference
#include "PString.h"
+ Include dependency graph for gitlab_doc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PString getGitlabDocUrl (const PString &projectUrl)
 Get the documentation url of the given project url if possible.
 

Function Documentation

◆ getGitlabDocUrl()

PString getGitlabDocUrl ( const PString & projectUrl)

Get the documentation url of the given project url if possible.

Parameters
projectUrl: url of the project to be used
Returns
corresponding documentation url or empty string if it cannot be determined

Definition at line 14 of file gitlab_doc.cpp.

14 {
15 PString docUrl;
16 if(!projectUrl.isSameBegining("https://gitlab")){
17 return docUrl;
18 }
19 PVecString vecSeparator(projectUrl.split('/'));
20 if(vecSeparator.size() < 5lu){
21 return docUrl;
22 }
23 docUrl += "https://" + vecSeparator[3lu].toLower() + ".pages" + vecSeparator[2lu].replace("gitlab", "") + "/";
24 for(size_t i(4lu); i < vecSeparator.size(); ++i){
25 docUrl += vecSeparator[i] + "/";
26 }
27 return docUrl;
28}