[aquaskk-changes 379] CVS update: AquaSKK/src/utility

Back to archive index

t-suw****@users***** t-suw****@users*****
2007年 9月 16日 (日) 09:21:45 JST


Index: AquaSKK/src/utility/utf8util.h
diff -u AquaSKK/src/utility/utf8util.h:1.1.2.1 AquaSKK/src/utility/utf8util.h:1.1.2.2
--- AquaSKK/src/utility/utf8util.h:1.1.2.1	Wed Sep 12 22:45:16 2007
+++ AquaSKK/src/utility/utf8util.h	Sun Sep 16 09:21:45 2007
@@ -131,12 +131,12 @@
 utf8iterator<Iterator> operator-(utf8iterator<Iterator> beg, int count) { return beg -= count; }
 
 // 原始的な手続き
-namespace utf8 {
+struct utf8 {
     typedef utf8iterator<std::string::iterator> iterator;
     typedef utf8iterator<std::string::const_iterator> const_iterator;
 
     // UTF8 文字列長取得
-    unsigned length(const std::string& str) {
+    static unsigned length(const std::string& str) {
 	return const_iterator(str.end()) - const_iterator(str.begin());
     }
 
@@ -147,7 +147,7 @@
     //      utf8::push(str, "a", -3); // "a文字列";
     //      utf8::push(str, "b");     // "a文字列b";
     // 
-    void push(std::string& target, const std::string& str, int offset = 0) {
+    static void push(std::string& target, const std::string& str, int offset = 0) {
 	if(0 <= offset || target.empty()) {
 	    target += str;
 	} else {
@@ -168,7 +168,7 @@
     //      utf8::pop(str);           // "文字";
     //      utf8::pop(str, -1);       // "å­—";
     // 
-    void pop(std::string& target, int offset = 0) {
+    static void pop(std::string& target, int offset = 0) {
 	iterator end(target.end());
 	iterator pos(end + (0 < offset ? 0 : offset)  - 1);
 


aquaskk-changes メーリングリストの案内
Back to archive index