(file) Return to LanguageParser.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/LanguageParser.cpp between version 1.13 and 1.15

version 1.13, 2005/05/30 13:25:00 version 1.15, 2005/05/30 13:43:49
Line 29 
Line 29 
 // //
 // Author: Humberto Rivero (hurivero@us.ibm.com) // Author: Humberto Rivero (hurivero@us.ibm.com)
 // //
 // Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3697, 3698  // Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3697, 3698, 3699, 3700
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 132 
Line 132 
         return quality;         return quality;
 } }
  
 String LanguageParser::parseContentLanguageValue(String & hdr){  String LanguageParser::parseContentLanguageValue(const String& hdr){
         // we are looking for the language part of the hdr only,         // we are looking for the language part of the hdr only,
         // according to the RFC, there may be parenthesized strings         // according to the RFC, there may be parenthesized strings
         // that describe the purpose of the language, we need to ignore those         // that describe the purpose of the language, we need to ignore those
Line 168 
Line 168 
         return value;         return value;
 } }
  
 String LanguageParser::getLanguage(String & language_tag){  String LanguageParser::getLanguage(const String & language_tag){
         // given a language_tag: en-US-mn we want to return "en"         // given a language_tag: en-US-mn we want to return "en"
         Uint32 i;         Uint32 i;
         if((i = language_tag.find(findSeparator(language_tag.getCString()))) != PEG_NOT_FOUND)         if((i = language_tag.find(findSeparator(language_tag.getCString()))) != PEG_NOT_FOUND)
Line 176 
Line 176 
         return String(language_tag);         return String(language_tag);
 } }
  
 String LanguageParser::getCountry(String & language_tag){  String LanguageParser::getCountry(const String & language_tag){
         // given a language_tag: en-US-mn we want to return "US"         // given a language_tag: en-US-mn we want to return "US"
         Uint32 i,j;         Uint32 i,j;
         if( (i = language_tag.find(findSeparator(language_tag.getCString()))) != PEG_NOT_FOUND )         if( (i = language_tag.find(findSeparator(language_tag.getCString()))) != PEG_NOT_FOUND )
Line 187 
Line 187 
         return String::EMPTY;         return String::EMPTY;
 } }
  
 String LanguageParser::getVariant(String & language_tag){  String LanguageParser::getVariant(const String & language_tag){
         // given a language_tag: en-US-mn we want to return "mn"         // given a language_tag: en-US-mn we want to return "mn"
         Uint32 i;         Uint32 i;
         if( (i = language_tag.find(findSeparator(language_tag.getCString()))) != PEG_NOT_FOUND )         if( (i = language_tag.find(findSeparator(language_tag.getCString()))) != PEG_NOT_FOUND )


Legend:
Removed from v.1.13  
changed lines
  Added in v.1.15

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2