[Groonga-commit] groonga/gcs [master] Use String#[] instead of String#charAt()

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 2日 (木) 15:17:06 JST


SHIMODA Hiroshi	2012-08-02 15:17:06 +0900 (Thu, 02 Aug 2012)

  New Revision: 8ea340964051d8be76f4e7c6bea30018b5b2dae4
  https://github.com/groonga/gcs/commit/8ea340964051d8be76f4e7c6bea30018b5b2dae4

  Log:
    Use String#[] instead of String#charAt()

  Modified files:
    lib/database/domain.js

  Modified: lib/database/domain.js (+2 -2)
===================================================================
--- lib/database/domain.js    2012-08-02 15:07:47 +0900 (ccc4305)
+++ lib/database/domain.js    2012-08-02 15:17:06 +0900 (af7e3cc)
@@ -203,12 +203,12 @@ Domain.prototype = {
   },
 
   getDocumentsEndpoint: function(hostname) {
-    if (hostname.charAt(0) != '.')
+    if (hostname[0] != '.')
       hostname = '.' + hostname;
     return 'doc-' + this.name + '-' + this.id + hostname;
   },
   getSearchEndpoint: function(hostname) {
-    if (hostname.charAt(0) != '.')
+    if (hostname[0] != '.')
       hostname = '.' + hostname;
     return 'search-' + this.name + '-' + this.id + hostname;
   },
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
다운로드 



Groonga-commit メーリングリストの案内
Back to archive index