function declineSingleCase(caseNumberIndex, patternIndex, word) {
	if (patternIndex < 0 || patternIndex >= pattern.length || caseNumberIndex < 1 || caseNumberIndex > 14) {
		return "???";
	}

	var word3 = palatalize(word);
	var placeholders = [];
	var suffixIndex = isPattern(pattern[patternIndex][1], word3, placeholders)
	if (suffixIndex < 0) {
		return "???";
	}

	var patternForCase = pattern[patternIndex][caseNumberIndex];
	if (patternForCase == "?") {
		return "?";
	}

	var rv = (!debugModeEnabled && caseNumberIndex == 1) ? /* 1. pad nemenime */
	unpalatalize(word3) : leftStr(suffixIndex, word3) + '-' + replacePlaceholders(patternForCase, placeholders);

	if (debugModeEnabled) {
		// preskoceni filtrovani
		return rv;
	}

	// Formatovani zivotneho sklonovani

	var hyphenIndex = rv.indexOf("-");
	var slashIndex = rv.indexOf("/");

	if (hyphenIndex != -1 && slashIndex != -1) {
		if (isMasculineGenderAnimate()) {
			// "text-xxx/yyy" -> "textyyy"
			rv = leftStr(hyphenIndex, rv) + rightStr(slashIndex + 1, rv);
		} else {
			// "text-xxx/yyy" -> "text-xxx"
			rv = leftStr(slashIndex, rv);
		}
	}

	// vypusteni pomocnych znaku
	rv = rv.replace(/[\/\-]/, "");
	rv = unpalatalize(rv);

	return rv;
}
/**
 * Declines a word using a declination pattern into specified case and number.
 * 
 * Global variables: pattern
 * 
 * @param caseNumberIndex
 *            index within the pattern (gender, number/case)
 */
Declines a word using a declination pattern into specified case and number.

Global variables: pattern

@param caseNumberIndex
index within the pattern (gender, number/case)
Declines a word using a declination pattern into specified case and number . Global variables : pattern @param caseNumberIndex index within the pattern ( gender number / case )
function declineSingleCase(caseNumberIndex, patternIndex, word) {
	if (patternIndex < 0 || patternIndex >= pattern.length || caseNumberIndex < 1 || caseNumberIndex > 14) {
		return "???";
	}
	var word3 = palatalize(word);
	var placeholders = [];
	var suffixIndex = isPattern(pattern[patternIndex][1], word3, placeholders)
	if (suffixIndex < 0) {
		return "???";
	}
	var patternForCase = pattern[patternIndex][caseNumberIndex];
	if (patternForCase == "?") {
		return "?";
	}
	var rv = (!debugModeEnabled && caseNumberIndex == 1) ? 
	unpalatalize(word3) : leftStr(suffixIndex, word3) + '-' + replacePlaceholders(patternForCase, placeholders);
	if (debugModeEnabled) {
		return rv;
	}
	var hyphenIndex = rv.indexOf("-");
	var slashIndex = rv.indexOf("/");
	if (hyphenIndex != -1 && slashIndex != -1) {
		if (isMasculineGenderAnimate()) {
			rv = leftStr(hyphenIndex, rv) + rightStr(slashIndex + 1, rv);
		} else {
			rv = leftStr(slashIndex, rv);
		}
	}
	rv = rv.replace(/[\/\-]/, "");
	rv = unpalatalize(rv);
	return rv;
}
function declineSingleCase ( caseNumberIndex , patternIndex , word ) { if ( patternIndex < 0 || patternIndex >= pattern . length || caseNumberIndex < 1 || caseNumberIndex > 14 ) { return "???" ; } var word3 = palatalize ( word ) ; var placeholders = [ ] ; var suffixIndex = isPattern ( pattern [ patternIndex ] [ 1 ] , word3 , placeholders ) if ( suffixIndex < 0 ) { return "???" ; } var patternForCase = pattern [ patternIndex ] [ caseNumberIndex ] ; if ( patternForCase == "?" ) { return "?" ; } var rv = ( ! debugModeEnabled && caseNumberIndex == 1 ) ? unpalatalize ( word3 ) : leftStr ( suffixIndex , word3 ) + '-' + replacePlaceholders ( patternForCase , placeholders ) ; if ( debugModeEnabled ) { return rv ; } var hyphenIndex = rv . indexOf ( "-" ) ; var slashIndex = rv . indexOf ( "/" ) ; if ( hyphenIndex != - 1 && slashIndex != - 1 ) { if ( isMasculineGenderAnimate ( ) ) { rv = leftStr ( hyphenIndex , rv ) + rightStr ( slashIndex + 1 , rv ) ; } else { rv = leftStr ( slashIndex , rv ) ; } } rv = rv . replace ( / [\/\-] / , "" ) ; rv = unpalatalize ( rv ) ; return rv ; }
Declines a word using a declination pattern into specified case and number.
Declines a word using a declination pattern into specified case and number .
/* 1. pad nemenime */ // preskoceni filtrovani // Formatovani zivotneho sklonovani // "text-xxx/yyy" -> "textyyy" // "text-xxx/yyy" -> "text-xxx" // vypusteni pomocnych znaku