Continued:
case EF_LIST_COMBINE:
{
strDescription = _I("Combines two delimited lists into a single delimited list.");
aryParameters.Add(_I("List 1: the first delimited list"));
aryParameters.Add(_I("List 2: the second delimited list"));
aryParameters.Add(_I("Delimiter: the list delimiter (options: defaults to semi-colon)"));
aryExamples.Add(_T("ListCombine([Keywords], [People])"));
break;
}
case EF_LIST_BUILD:
{
strDescription = _I("Build a list from a series of values, possibly suppressing empty items.");
JRString strMode = _I("Mode: the mode to use when building the list");
strMode += _I("\r\n\t0: combine all values");
strMode += _I("\r\n\t1: combine non-empty values");
aryParameters.Add(strMode);
aryParameters.Add(_I("Delimiter: the delimiter to be used in the list"));
aryParameters.Add(_I("List: the list of items (any number)"));
aryExamples.Add(_T("ListBuild(1, / • , a, , b, , c)"));
break;
}
case EF_FORMAT_NUMBER:
{
strDescription = _I("Formats a number in a specified manner.");
aryParameters.Add(_I("Value: the number to format"));
aryParameters.Add(_I("Number of decimal places: specifies how many decimals to use (-1 uses as many as necessary) (optional: defaults to 0)"));
aryParameters.Add(_I("Empty display: value to display for an empty number (optional: defaults to nothing)"));
aryParameters.Add(_I("Label (singular): label to apply to the number if equal to one"));
aryParameters.Add(_I("Label (plural): label to apply to the number if not equal to one"));
aryExamples.Add(_T("FormatNumber(3.123224, 0)"));
aryExamples.Add(_T("FormatNumber([Replay Gain, 0], 3)"));
aryExamples.Add(_T("FormatNumber([Number Plays, 0], 0, never played, play, plays)"));
break;
}
case EF_FORMAT_DATE:
{
strDescription = _I("Formats a date in a specified manner.");
aryParameters.Add(_I("Value: the date to format"));
JRString strFormattingStyle;
strFormattingStyle = _I("Formatting: the formatting style");
strFormattingStyle += _I("\r\n\tYear: 1997");
strFormattingStyle += _I("\r\n\tMonth: March");
strFormattingStyle += _I("\r\n\tDay: 12");
strFormattingStyle += _I("\r\n\tHour: 16");
strFormattingStyle += _I("\r\n\tMinute: 32");
strFormattingStyle += _I("\r\n\tFilename: 20040521-032221");
strFormattingStyle += _I("\r\n\tElapsed: 3.2 days ago");
strFormattingStyle += _I("\r\n\tDate: format using system standard");
strFormattingStyle += _I("\r\n\tDateTime: format using system standard, including time");
strFormattingStyle += _I("\r\n\tOther: flexible formatting (i.e. yy-MMMM-dd)");
aryParameters.Add(strFormattingStyle);
aryParameters.Add(_I("No date output: the output when the date is emtpy (optional: defaults to nothing)"));
aryExamples.Add(_T("FormatDate([Date Imported, 0], elapsed)"));
aryExamples.Add(_T("FormatDate([Date, 0], MMMM: d, no date)"));
break;
}
case EF_FORMAT_BOOLEAN:
{
strDescription = _I("Formats a boolean (true / false) value in a specified manner.");
aryParameters.Add(_I("Value: the boolean to format"));
aryParameters.Add(_I("True display: string to display for true (optional: defaults to \"True\")"));
aryParameters.Add(_I("False display: string to display for false (optional: defaults to \"False\")"));
aryExamples.Add(_T("FormatBoolean(1)"));
aryExamples.Add(_T("FormatBoolean(IsMissing(), File missing, File exists)"));
break;
}
case EF_FORMAT_DURATION:
{
strDescription = _I("Formats a duration in seconds to a readable string.");
aryParameters.Add(_I("Value: the value in seconds to format"));
aryExamples.Add(_T("FormatDuration(60)"));
aryExamples.Add(_T("FormatDuration([Duration, 0])"));
break;
}
case EF_FORMAT_FILESIZE:
{
strDescription = _I("Formats a number of bytes as a readable string.");
aryParameters.Add(_I("Value: the value in bytes to format"));
aryExamples.Add(_T("FormatFileSize(1024)"));
aryExamples.Add(_T("FormatFileSize([File Size, 0])"));
break;
}
case EF_FORMAT_RANGE:
{
strDescription = _I("Formats a value as a range.");
aryParameters.Add(_I("Value: the value to format"));
aryParameters.Add(_I("Range size: the number of letters / numbers to put in a grouping (optional: defaults to 1)"));
aryParameters.Add(_I("Mode: the mode to perform the grouping (optional: defaults to 0)"));
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t0: automatically choose between number / letter grouping");
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t1: use letter grouping");
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t2: use number grouping");
aryExamples.Add(_T("FormatRange(Abba, 3)"));
aryExamples.Add(_T("FormatRange([Artist])"));
aryExamples.Add(_T("FormatRange(([Bitrate, 0], 100, 2)"));
break;
}
case EF_PAD_NUMBER:
{
strDescription = _I("Adds leading zeros to a number.");
aryParameters.Add(_I("Value: the value to pad"));
aryParameters.Add(_I("Number of digits: the number of digits in the number"));
aryExamples.Add(_T("PadNumber([Track #], 3)"));
break;
}
case EF_CLEAN:
{
strDescription = _I("Returns a cleaned up version of a filled in template.");
aryParameters.Add(_I("Value: the value to clean"));
aryExamples.Add(_T("Clean(Abba - - Gold)"));
aryExamples.Add(_T("Clean([Artist] - [Album] /([Genre]/))"));
break;
}
case EF_FIX_CASE:
{
strDescription = _I("Changes the case of a string.");
aryParameters.Add(_I("Value: the value to change"));
aryParameters.Add(_I("Mode: case mode (optional: defaults to title case)"));
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t0: title case");
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t1: all words");
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t2: first word");
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t3: all uppercase");
aryParameters[aryParameters.GetUpperBound()] += _I("\r\n\t4: all lowercase");
aryExamples.Add(_T("FixCase(MaKe ME PreTTy)"));
aryExamples.Add(_T("FixCase([File Type], 3)"));
break;
}
case EF_LENGTH:
{
strDescription = _I("Returns the number of characters in a value.");
aryParameters.Add(_I("Value: the value to get number of characters from"));
aryExamples.Add(_T("Length(Abba)"));
aryExamples.Add(_T("Length([Artist])"));
break;
}
case EF_LEFT:
{
strDescription = _I("Retrieves specified number of characters from the left of a value.");
aryParameters.Add(_I("Value: the value to get characters from"));
aryParameters.Add(_I("Characters: the number of characters to get"));
aryExamples.Add(_T("Left(Abba, 2)"));
aryExamples.Add(_T("Left([Artist], 3)"));
break;
}
case EF_RIGHT:
{
strDescription = _I("Retrieves specified number of characters from the right of a value.");
aryParameters.Add(_I("Value: the value to get characters from"));
aryParameters.Add(_I("Characters: the number of characters to get"));
aryExamples.Add(_T("Right(Abba, 2)"));
aryExamples.Add(_T("Right([Artist], 3)"));
break;
}
case EF_MID:
{
strDescription = _I("Retrieves specified characters from a value.");
aryParameters.Add(_I("Value: the value to get characters from"));
aryParameters.Add(_I("Start: the character to start at (optional: defaults to 0)"));
aryParameters.Add(_I("Characters: the number of characters to get (-1 returns all) (optional: defaults to 1)"));
aryExamples.Add(_T("Mid(Abba, 1)"));
aryExamples.Add(_T("Mid(Abba, 0, 1)"));
aryExamples.Add(_T("Mid([Artist], 3, -1)"));
break;
}
case EF_REMOVE_LEFT:
{
strDescription = _I("Trims characters from the start of a value.");
aryParameters.Add(_I("Value: the value to trim"));
aryParameters.Add(_I("Characters: how many characters to trim (spaces count as characters)"));
aryExamples.Add(_T("RemoveLeft(01. Abba, 4)"));
aryExamples.Add(_T("RemoveLeft([Artist], 1)"));
break;
}
case EF_REMOVE_RIGHT:
{
strDescription = _I("Trims characters from the end of a value.");
aryParameters.Add(_I("Value: the value to trim"));
aryParameters.Add(_I("Characters: how many characters to trim (spaces count as characters)"));
aryExamples.Add(_T("RemoveRight(Abba junkatend, 10)"));
aryExamples.Add(_T("RemoveRight([Artist], 1)"));
break;
}
case EF_COUNTER:
{
strDescription = _I("Return a value that starts at one and counts up with each use.");
aryParameters.Add(_I("Start: number to start counting from (optional: defaults to 1)"));
aryParameters.Add(_I("Increment: number to increment by each iteration (optional: defaults to 1)"));
aryExamples.Add(_T("Counter()"));
break;
}
case EF_NOW:
{
strDescription = _I("Returns the current date.");
aryExamples.Add(_T("FormatDate(Now(), Year)"));
break;
}
case EF_REPLACE:
{
strDescription = _I("Replace or remove strings from a value.");
aryParameters.Add(_I("Value: the value to search in"));
aryParameters.Add(_I("Find: the value to search for"));
aryParameters.Add(_I("Replace: the value to replace with (optional: defaults to empty / remove)"));
aryExamples.Add(_T("Replace(Abxxxba, x)"));
aryExamples.Add(_T("Replace([Artist], Featuring, ft.)"));
break;
}
case EF_HEXIFY:
{
strDescription = _I("Hexifies a string to make it suitable for website usage.");
aryParameters.Add(_I("Value: the value hexify"));
aryExamples.Add(_T("Hexify([Artist])"));
break;
}
case EF_MATH:
{
strDescription = _I("Evaluates a mathematical formula.");
aryParameters.Add(_I("Formula: the formula to evaluate"));
aryExamples.Add(_T("Math(3 + 4)"));
aryExamples.Add(_T("Math((3 + 4) / 2)"));
aryExamples.Add(_T("Math((Length([Artist]) + Length([Album]) / 2)"));
aryExamples.Add(_T("Left([Artist], Math(Length([Artist]) - 1))"));
break;
}
case EF_NOTE:
{
strDescription = _I("Gets information from a note.");
aryParameters.Add(_I("Field: the field name"));
aryParameters.Add(_I("Type: the field type (optional: defaults to any type)"));
aryParameters.Add(_I("Occurrence: the occurence (optional: defaults to 0)"));
aryExamples.Add(_T("Note(Phone)"));
aryExamples.Add(_T("Note(Phone, Work)"));
aryExamples.Add(_T("Note(Phone, Work, 1)"));
break;
}
case EF_IS_PLAYING:
{
strDescription = _I("Determines if a file is currently playing in any zone.");
aryExamples.Add(_T("IsPlaying()"));
break;
}
case EF_IS_IN_PLAYING_NOW:
{
strDescription = _I("Determines if a file is in Playing Now in any zone.");
aryExamples.Add(_T("IsInPlayingNow()"));
break;
}
default:
// there should be a handler for every function
ASSERT(FALSE);
bRetVal = FALSE;
}