有一个CString对象,现在想在指定位置查入一个字符,该用那个函数呢?麻烦写的详细些,谢谢!

解决方案 »

  1.   

    CString str = "0123456789";
    str.SetAt(5,'A');结果:
    str1 = "01234A6789"。
      

  2.   

    哎,这两天写了n个关于CString操作的东西了...看看这两天的帖子应该都还有的int Insert(
       int iIndex,
       PCXSTR psz
    );
    int Insert(
       int iIndex,
       XCHAR ch
    ); 
    可以吗?
      

  3.   

    CString::Insert
    int Insert( int nIndex, TCHAR ch )
    throw( CMemoryException );int Insert( int nIndex, LPCTSTR pstr )
    throw( CMemoryException );Return ValueThe length of the changed string.