ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/outil/src/ot_chaine.cpp
Revision: 708
Committed: Mon Aug 31 20:21:13 2015 UTC (9 years, 8 months ago) by francois
File size: 704 byte(s)
Log Message:
exportation code aster le fichier mail ne depasse plus 80 caracteres

File Contents

# User Rev Content
1 francois 708 #include "gestionversion.h"
2     #include "ot_chaine.h"
3     #include <string.h>
4     #include <string>
5     #include <iostream>
6     #include <stdio.h>
7    
8    
9    
10    
11    
12     OT_CHAINE::OT_CHAINE()
13     {
14     }
15    
16    
17    
18    
19     OT_CHAINE::OT_CHAINE(OT_CHAINE& mdd)
20     {
21    
22     }
23    
24    
25    
26     OT_CHAINE::~OT_CHAINE()
27     {
28    
29     }
30    
31    
32    
33     void OT_CHAINE::ini_mg_fprintf(int pos,char c)
34     {
35     longmax=pos;
36     charseparateur=c;
37     }
38    
39    
40     void OT_CHAINE::mg_fprintf(FILE* in,char* message)
41     {
42     std::string chaine=message;
43     int lon=chaine.length();
44     while (lon>longmax)
45     {
46     int pos=chaine.rfind(charseparateur,longmax);
47     std::string chaine1=chaine.substr(0,pos);
48     chaine=chaine.substr(pos);
49     lon=chaine.length();
50     fprintf(in,"%s\n",chaine1.c_str());
51     }
52     fprintf(in,"%s",chaine.c_str());
53    
54    
55     }