code: function getResourcePath(sResourceName, sSuffix) {
  
  		var sNamePrefix = sResourceName,
  			p = sResourceName.length,
  			sPath;
  
  		// search for a registered name prefix, starting with the full name and successively removing one segment
  		while ( p > 0 && !mUrlPrefixes[sNamePrefix] ) {
  			p = sNamePrefix.lastIndexOf('/');
  			// Note: an empty segment at p = 0 (leading slash) will be ignored
  			sNamePrefix = p > 0 ? sNamePrefix.slice(0, p) : '';
  		}
  
  		assert((p > 0 || sNamePrefix === '') && mUrlPrefixes[sNamePrefix], "there always must be a mapping");
  
  		sPath = mUrlPrefixes[sNamePrefix].url + sResourceName.slice(p + 1); // also skips a leading slash!
  
  		//remove trailing slash
  		if ( sPath.slice(-1) === '/' ) {
  			sPath = sPath.slice(0, -1);
  		}
  		return sPath + (sSuffix || '');
  
  	}
docs: Retrieves path to a given resource by finding the longest matching prefix for the resource name
  
  @param {string} sResourceName name of the resource stored in the resources map
  @param {string} sSuffix url suffix
  
  @returns {string} resource path