当前位置: 首页>>代码示例>>C++>>正文


C++ AnsiString::Length方法代码示例

本文整理汇总了C++中AnsiString::Length方法的典型用法代码示例。如果您正苦于以下问题:C++ AnsiString::Length方法的具体用法?C++ AnsiString::Length怎么用?C++ AnsiString::Length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AnsiString的用法示例。


在下文中一共展示了AnsiString::Length方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetFilePath

AnsiString __fastcall TFTPFile::GetFilePath(AnsiString ServerString)
{
  int pos = ServerString.LowerCase().Pos("ftp://");
  if(pos < 1)
    return "";
  ServerString = ServerString.SubString(pos + 6,ServerString.Length() - pos);
  pos = StrLScan(ServerString.c_str(),"/");
  if(pos < 0)
    return "";
  ServerString = ServerString.SubString(pos + 2,ServerString.Length() - pos - 1);
  pos = StrRScan(ServerString.c_str(),"/");
  if(pos < 0)
    return "/";
  ServerString = ServerString.SubString(1,pos);
  if(ServerString.SubString(1,1) != "/")
    ServerString = "/" + ServerString;
  if(ServerString.SubString(ServerString.Length(),1) != "/")
    ServerString = ServerString + "/";
  return ServerString;
}
开发者ID:josecohenca,项目名称:xmlconvertsql,代码行数:20,代码来源:FTPFile.cpp

示例2:

void __fastcall TDB_packer::ExtBtn3Click(TObject *Sender)
{
	TElShellTreeItem* itm = shellTree->ItemFocused;
    if(!itm->IsFolder)
    {
        AnsiString str				= itm->FullName;
        int root_len 				= xr_strlen(m_root_folder);
        int len						= str.Length();
    	lbIncludeFiles->Items->Add( str.SubString(root_len+1,len-root_len) );
    }
}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:11,代码来源:FrmDBXpacker.cpp

示例3: GetUserName

AnsiString __fastcall TFTPFile::GetUserName(AnsiString ServerString)
{
  int pos = ServerString.LowerCase().Pos("ftp://");
  if(pos < 1)
    return "";
  ServerString = ServerString.SubString(pos + 6,ServerString.Length() - pos);
  pos = StrLScan(ServerString.c_str(),":");
  if(pos < 0)
    return "";
  return DecryFTPPassword(ServerString.SubString(1,pos));
}
开发者ID:josecohenca,项目名称:xmlconvertsql,代码行数:11,代码来源:FTPFile.cpp

示例4: AddANewModule

//---------------------------------------------------------------------------
void TfrmMainFormServer::AddANewModule(){
    AnsiString name = InputBox("New Virtual Directory",
        "Enter an alias WITHOUT spaces",
        "ANewName");

    if(name.Length() > 0){
        adapter.AddANewModule(name);
        LoadModuleNames();
    }


}
开发者ID:AndyHuang7601,项目名称:EpicGames-UnrealEngine,代码行数:13,代码来源:MainFormServer.cpp

示例5: GeraCampoLivre

//---------------------------------------------------------------------------
AnsiString __fastcall TBolBradesco::GeraCampoLivre(void)
{
    AnsiString CampoLivre = Agencia.SubString(1,4) +
    Carteira + GetNumeroDocumento() +
    CodigoCedente.SubString(1,7) +
    "0";
    if(CampoLivre.Length() != 25)
     {
      throw Exception("Campo livre deve conter 25 caracteres para o Banco Bradesco.");
     }
    return(CampoLivre);
}
开发者ID:fboscato,项目名称:escrituracao-fiscal-g1,代码行数:13,代码来源:TBolBradesco.cpp

示例6: wxFileConfig

//----------------------------------------------------------------------------
//class TMemIniFile : public TCustomIniFile
//----------------------------------------------------------------------------
// TIniFileのバグ回避版らしい・・・が、TIniFileと同じことをやる。ドン
TMemIniFile::TMemIniFile(const AnsiString& str) : m_pStream(NULL), m_pConfig(NULL)
{
	if ( str.AnsiPos("\\\\?\\") )
		m_strIniFile = str.SubString( 4, str.Length() - 4).c_str();
	else
		m_strIniFile = str.c_str();
//	m_pStream = new wxFileInputStream( m_strIniFile );
//	m_pConfig = new wxFileConfig(*m_pStream);

//	m_pConfig = new wxFileConfig(wxEmptyString, wxEmptyString, m_strIniFile, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
	m_pConfig = new wxFileConfig(wxT("krkr"), wxT("ym"), m_strIniFile, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
}
开发者ID:xmoeproject,项目名称:X-moe,代码行数:16,代码来源:IniFiles.cpp

示例7: MyPlaySound

//---------------------------------------------------------------------------
void MyPlaySound(AnsiString file)
{
  if( file.Length() == 0 )
    return;
  if( ! FileExists(file) )
  {
    WriteToLogError("WARNING\tPlay sound: file \"%s\" not found !", file.c_str());
    return;
  }
  if( ::PlaySound(file.c_str(), NULL, SND_FILENAME | SND_NODEFAULT | SND_NOWAIT | SND_SYNC) == FALSE )
    WriteToLogError("ERROR\tPlay sound: \"%s\"", FormatLastError2(GetLastError()).c_str());
}
开发者ID:MaxBelkov,项目名称:visualsyslog,代码行数:13,代码来源:sound.cpp

示例8: CheckFileBool

//---------------------------------------------------------------------------
bool TUtilities::CheckFileBool(std::ifstream &InFile)
//no need to worry about leading '\n' characters as the skipws (skip white space) flag is
//set automatically
{
AnsiString BoolString;
if(!CheckAndReadFileString(InFile, BoolString)) return false;
if(InFile.fail()) return false;
if(BoolString == "") return false;
if((BoolString.Length() > 1) || (BoolString == "")) return false;
if((BoolString != "0") && (BoolString != "1")) return false;
return true;
}
开发者ID:jagercode,项目名称:railway-dot-exe,代码行数:13,代码来源:Utilities.cpp

示例9: StringToTokiensA

//---------------------------------------------------------------------------
void StringToTokiensA( AnsiString Words, AnsiString Dlmtr, TStrings *Making )
{
  AnsiString Work = Words.Trim();
  int spos;
  while ((spos = Work.AnsiPos(Dlmtr)) != 0) {
    Making->Add(Work.SubString( 1, spos-1));
    Work = Work.SubString( spos+1, Work.Length() - spos);
    Work = Work.Trim();
  } // while
  if (Work != "")
    Making->Add(Work);
}
开发者ID:GraffLittle,项目名称:first,代码行数:13,代码来源:Commons.cpp

示例10: PuttyInitialize

//---------------------------------------------------------------------------
void __fastcall PuttyInitialize()
{
  SaveRandomSeed = true;

  InitializeCriticalSection(&putty_section);

  // make sure random generator is initialised, so random_save_seed()
  // in destructor can proceed
  random_ref();

  flags = FLAG_VERBOSE | FLAG_SYNCAGENT; // verbose log

  sk_init();

  AnsiString VersionString = SshVersionString();
  assert(!VersionString.IsEmpty() && (static_cast<size_t>(VersionString.Length()) < LENOF(sshver)));
  strcpy(sshver, VersionString.c_str());
  AnsiString AppName = AppNameString();
  assert(!AppName.IsEmpty() && (static_cast<size_t>(AppName.Length()) < LENOF(appname_)));
  strcpy(appname_, AppName.c_str());
}
开发者ID:elazzi,项目名称:winscp,代码行数:22,代码来源:PuttyIntf.cpp

示例11: GetFileList

//---------------------------------------------------------------------------
bool __fastcall TRelDirSearchForm::GetFileList(AnsiString folder)
{
	try
	{
		GetFileList(folder, folder.Length());
	}
	catch(...)
	{
		return false;
	}
	return true;
}
开发者ID:xmoeproject,项目名称:X-moe,代码行数:13,代码来源:RelDirSearchUnit.cpp

示例12: InValidDouble

bool __fastcall TEntryForm::InValidDouble(AnsiString label, TEditPlus *edit)
{
  AnsiString ud = edit->Text;
  if (ud[1] == '-')
    ud.Delete(1,1);
  if (strspn(ud.c_str(), "0123456789.") == (unsigned)ud.Length())
    return false;
  AnsiString msg = "The field "+label+" contains the value '"+edit->Text+"'."
                  +" This is invalid for a non null double field";
  Application->MessageBox(msg.c_str(), "Invalid Double", ID_OK);
  return true;
}
开发者ID:VincentRisi,项目名称:jportal,代码行数:12,代码来源:GFEEntryUnit.cpp

示例13: DostosujZnakiSpecjalne

//---------------------------------------------------------------------------
/// Metoda odpowiedzialna za dostosowanie znaków specjalnych w tekœcie (apostrofy itp.),
/// poprzez dodanie dodanie "\"
void __fastcall ParsujDane::DostosujZnakiSpecjalne(AnsiString &AText)
{
	AnsiString str;
	int pozycjaZnacznik = 0;

	while(pozycjaZnacznik != AText.Length())
	{
		str = AText[pozycjaZnacznik];
		if (str == "\'" || str == "\"") AText.Insert("\\", pozycjaZnacznik - 1);
		pozycjaZnacznik++;
	}
}
开发者ID:godzillaq,项目名称:Proces_ETL,代码行数:15,代码来源:UParsuj.cpp

示例14: Bezogonkow

AnsiString Global::Bezogonkow(AnsiString str, bool _)
{ // wyciêcie liter z ogonkami, bo OpenGL nie umie wyœwietliæ
    for (int i = 1; i <= str.Length(); ++i)
        if (str[i] & 0x80)
            str[i] = bezogonkowo[str[i] & 0x7F];
        else if (str[i] < ' ') // znaki steruj¹ce nie s¹ obs³ugiwane
            str[i] = ' ';
        else if (_)
            if (str[i] == '_') // nazwy stacji nie mog¹ zawieraæ spacji
                str[i] = ' '; // wiêc trzeba wyœwietlaæ inaczej
    return str;
}
开发者ID:kononowicz24,项目名称:maszyna,代码行数:12,代码来源:Globals.cpp

示例15: StringToAudHours

//---------------------------------------------------------------------------
void __fastcall TFormReportUchebKartStud::StringToAudHours(AnsiString  h[12], AnsiString &str_hours)
{
    int cur_sem = 0;
    int begin = 1;
    for(int pos = 1; pos <= str_hours.Length(); pos++)
    {
        if (str_hours[pos] == ';')
        {
            h[cur_sem++] = str_hours.SubString(begin, pos - begin);
            begin = pos + 1;
        }
    }
}
开发者ID:,项目名称:,代码行数:14,代码来源:


注:本文中的AnsiString::Length方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。