Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/common.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by youi, Mon Nov 22 08:25:16 2004 UTC revision 1.2 by aga, Fri Nov 26 03:29:43 2004 UTC
# Line 3  Line 3 
3   *   *
4   * $Revision$   * $Revision$
5   * $Log$   * $Log$
6     * Revision 1.2  2004/11/26 03:29:43  aga
7     * ・intToString()を作成.
8     *
9   * Revision 1.1  2004/11/22 08:25:16  youi   * Revision 1.1  2004/11/22 08:25:16  youi
10   * initial version.   * initial version.
11   *   *
# Line 60  char* setValue( char** dstptr, const cha Line 63  char* setValue( char** dstptr, const cha
63      }      }
64      return *dstptr;      return *dstptr;
65  }  }
66    
67    /**
68     *
69     * intを文字列に変換。
70     *
71     * @param i 変換すべき数値
72     * @return 変換後の文字列
73     *
74     */
75    string intToString( int i ){
76            char buf[sizeof(int)*3+1+1+1]; // nバイトなら3n+1桁以下、符号で1桁、\0で1桁
77            snprintf( buf, sizeof(buf), "%d", i );
78            string s( buf );
79            return s;
80    }
81    
82    
83    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26