當前位置: 首頁>>代碼示例>>C++>>正文


C++ XString::findRev方法代碼示例

本文整理匯總了C++中XString::findRev方法的典型用法代碼示例。如果您正苦於以下問題:C++ XString::findRev方法的具體用法?C++ XString::findRev怎麽用?C++ XString::findRev使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XString的用法示例。


在下文中一共展示了XString::findRev方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: getFilenameExtension

XString getFilenameExtension(XString s)
{       
  int i = s.findRev('.');

  s = s.mid(i + 1);
  return s; 
}
開發者ID:DamianSuess,項目名稱:kbasic,代碼行數:7,代碼來源:main.cpp

示例2: getFilenameWithoutPath

XString getFilenameWithoutPath(XString s)
{       
  int i = s.findRev('\\');
  if (i == -1){
    i = s.findRev('/');
  }
  s = s.right(s.length() - i - 1);
  return s; 
}
開發者ID:DamianSuess,項目名稱:kbasic,代碼行數:9,代碼來源:main.cpp

示例3: getFilenameWithoutPathAndExtension

XString getFilenameWithoutPathAndExtension(XString s)
{       
  XString k = getFilenameWithoutPath(s);

  int i = k.findRev('.');

  k = k.left(i);
  return k; 
}
開發者ID:DamianSuess,項目名稱:kbasic,代碼行數:9,代碼來源:main.cpp

示例4: kbc


//.........這裏部分代碼省略.........
  sProjectName = "KBasic Default Project";
  sProjectType = "With Forms MainWindow (you must have myMenuBar created)";
  sTranslation = "&Window;Help;C&ontents;A&bout;Cl&ose;Close &All;&Tile;&Cascade;Arrange &icons;Ne&xt;Pre&vious;";
  sSQL = "QPSQL;localhost;test;postgres;test";

*/

 // if (bUseCache) printf("!!!!!");


 // sprintf(ac, "");
  //if (MAIN_argc > 1 && i <= MAIN_argc) sprintf(ac, "%s", MAIN_argv[i]);
  
  //sprintf(ac, "C:/kbasic16/kbide/examples/kbasic/builtin/__class__.kbasic");

  //if (utility::my_stricmp(ac, "") == 0) return 0;

  //bUseCache = false;
  {
    sKBasicPath = MAIN_argv[0];  
    bool bDebug = false;
#ifdef WINDOWS // HIDE
    bDebug = sKBasicPath.contains("Debug"); // HIDE
#endif // HIDE

    sKBasicPath = sKBasicPath.replace("\\", "/");
#ifdef WINDOWS // HIDE
    sKBasicPath = sKBasicPath.replace("/Debug", "", false); // HIDE
    sKBasicPath = sKBasicPath.replace("/Release", "", false); // HIDE
    sKBasicPath = sKBasicPath.replace(".exe", "", false); // HIDE
#endif // HIDE

    if (bDebug){
      int n = sKBasicPath.findRev("/");
      if (n >= 0) sKBasicPath = sKBasicPath.left(n);

      sKBasicPath = sKBasicPath.replace("kbc", "kbide/ide/cache");
    } else {
      sKBasicPath = sKBasicPath.replace("kbc", "ide/cache");
    }
    
    if (sKBasicPath.isEmpty()) return 0;
  }

  // if (checkLicense(acLicense) == false) return 0;


//  checkSerialNo();

	textbuffer *myTextbuffer = new textbuffer(); // needed to truncate big input strings or zero terminate them
 
  cache *my_cache = new cache();
  token *myToken = new token();
	scanner *myScanner = new scanner(myToken, my_cache);

	char *acText;
  bool b = true;

  if (utility::readSourceFile(&acText, cachePath("project.name").ascii(), myTextbuffer)){
    acText = utility::eatUTF16DOM(acText);
    sProjectName = acText;
  }

//  if (b && (b = utility::readSourceFile(&acText, "c:/kbasic16/kbide/ide/cache/C__kbasic16_kbide_examples_kbasic_builtin___class__.kbasic.scanner", myTextbuffer))){}

開發者ID:DamianSuess,項目名稱:kbasic,代碼行數:65,代碼來源:main.cpp


注:本文中的XString::findRev方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。