Meta tags:
description= ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. The ICU User Guide provides documentation on how to use ICU.;
Headings (most frequently used words):
formattedvalue, contents, overview, nested, span, fields,
Text of the page (most frequently used words):
icu (26), and (23), for (18), the (15), cfpos (12), java (10), span (9), #formattedvalue (9), result (8), formatting (8), setup (8), icu4c (8), data (8), use (7), date (7), with (7), examples (7), documentation (6), docs (6), fields (6), are (6), index (6), assertequals (6), 2018 (6), code (6), unicode (5), input (5), icu4j (5), github (4), can (4), nextposition (4), field (4), expect (4), july (4), august (4), input2 (4), input1 (4), fmt (4), let (4), locale (4), status (4), search (4), apis (4), time (4), this (3), page (3), you (3), start (3), end (3), more (3), dates (3), dateintervalformat (3), constrainedfieldposition (3), new (3), from (3), formatteddateinterval (3), string (3), api (3), numbers (3), updating (3), cldr (3), integration (3), release (3), collation (3), faq (3), site (2), uses (2), theme (2), jekyll (2), just (2), primitive (2), example (2), using (2), they (2), than (2), one (2), occurrence (2), assertfalse (2), such (2), happen (2), equal (2), else (2), getlimit (2), getstart (2), spanfield (2), constrainfieldandvalue (2), tostring (2), u2013 (2), expected (2), output (2), format (2), formattovalue (2), skeleton (2), dmmmmy (2), how (2), which (2), interval (2), formatters (2), implemented (2), nested (2), strings (2), number (2), details (2), classes (2), overview (2), home (2), git (2), profiling (2), developers (2), contributors (2), user (2), guide (2), break (2), rules (2), synchronization (2), version (2), update (2), measureunit (2), publish (2), tests (2), copy (2), build (2), custom (2), tries (2), point (2), normalization (2), design (2), layout (2), rulebasednumberformat (2), calendar (2), services (2), resources (2), conversion (2), link (2), edit, 2016, later, inc, others, license, terms, http, www, org, copyright, html, back, top, may, cover, multiple, above, contains, both, month, those, will, also, present, check, their, indices, see, contained, within, desired, date_interval_span, method, looks, very, similar, except, equivalent, types, ufield_category_date_interval_span, constrainfield, here, determine, region, formatted, corresponds, 2nd, argument, certain, like, return, information, about, spans, correspond, different, parameters, category, being, set, associating, value, subclass, integer, formattedlist, resultasvalue, uformattedvalue, abstraction, localized, attributes, returned, available, list, all, implementing, refer, contents, local, tooling, configs, source, maven, monitoring, tools, errorprone, eclipse, ant, callgrind, configuring, linux, editing, built, iterator, skipping, known, test, failures, including, standards, wip, miscellaneous, maintenance, procedure, legalities, healthy, shared, updates, announcements, milestone, tasks, developing, fuzzer, targets, continuous, coding, guidelines, reports, preparsed, ucd, ucharstrie, bytestrie, structures, cobol, resource, tracing, tool, paragraph, engine, ustream, ustdio, boundary, analysis, ignore, punctuation, options, customization, architecture, concepts, transform, rule, tutorial, bidi, algorithm, case, mappings, transforms, trying, final, candidate, messageformat, message, messages, times, skeletons, rounding, modes, legacy, numberformat, universal, scale, zone, timezone, localizing, locales, compression, charset, detection, converter, stringprep, regular, expressions, unicodeset, properties, utext, characteriterator, iterators, utf, chars, why, service, provider, plug, ins, header, only, packaging, building, demos, glossary, info, posix, migration, basics, internationalization, contacts, mailing, lists, downloading, copied, document, external, expand, menu, skip, main, content,
Text of the page (random words):
formattedvalue icu documentation skip to main content link menu expand external link document search copy copied icu documentation icu documentation downloading icu icu 78 icu 77 icu 76 contacts and mailing lists icu user guide icu internationalization how to use icu unicode basics icu services icu design c posix migration release info glossary demos icu4c icu4c faq building icu4c packaging icu4c c header only apis plug ins icu4j icu4j faq icu4j locale service provider why use icu4j chars and strings utf 8 c code point iterators characteriterator utext properties unicodeset regular expressions stringprep conversion converter conversion data charset detection compression locales and resources locale examples resources localizing with icu date time calendar services calendar examples timezone classes date and time zone examples universal time scale formatting formatting numbers legacy numberformat rounding modes number skeletons formattedvalue rulebasednumberformat rulebasednumberformat examples formatting dates and times date and time formatting examples formatting messages message formatting examples messageformat 2 0 trying mf 2 0 final candidate transforms case mappings bidi algorithm normalization transform rule tutorial collation concepts architecture customization string search collation faq api details collation examples ignore punctuation options boundary analysis break rules io ustdio ustream layout engine paragraph layout icu data icu data build tool resource and data tracing use from cobol design docs custom normalization data structures bytestrie icu code point tries icu string tries ucharstrie preparsed ucd contributors ci reports coding guidelines continuous integration custom icu4c synchronization developing fuzzer targets for icu apis release milestone tasks announcements apis docs build updates copy shared tests healthy code integration tests legalities maintenance release procedure miscellaneous publish publish version 76 1 wip standards update cldr icu integration including icu4c data to icu4j updating measureunit with new cldr data updating measureunit with new cldr data unicode update version numbers skipping known test failures synchronization updating icu s built in break iterator rules user guide editing git and github for icu developers setup for contributors c setup c setup on linux configuring vs code for icu4c profiling icu4c with callgrind java setup ant setup for java eclipse setup for java developers errorprone for java java profiling and monitoring tools maven setup for java source code setup local tooling configs for git and github this site uses just the docs a documentation theme for jekyll search icu documentation api docs icu on github icu home page unicode home page formatting formatting numbers formattedvalue formattedvalue contents overview nested span fields overview formattedvalue is an abstraction for localized strings with attributes returned by a number of icu formatters apis for formattedvalue are available in java c and c for more details and a list of all implementing classes refer to the api docs c formattedvalue c uformattedvalue search for resultasvalue java formattedvalue nested span fields certain icu formatters like formattedlist and formatteddateinterval use span fields to return information about which spans of a string correspond to different input parameters in c and c span fields are implemented using a field category with the field being set to the input index in java they are implemented by associating an integer value with a spanfield subclass for example in c here is how you can determine which region in a formatted date interval corresponds to the 2nd argument index 1 in the input date interval the to date let fmt be a dateintervalformat for locale en us and skeleton dmmmmy let input1 be july 20 2018 and input2 be august 3 2018 formatteddateinterval result fmt formattovalue input1 input2 status assertequals expected output from format u july 20 u2013 august 3 2018 result tostring status constrainedfieldposition cfpos cfpos constrainfield ufield_category_date_interval_span 0 if result nextposition cfpos status assertequals expect start index 0 cfpos getstart assertequals expect end index 7 cfpos getlimit else no such span can happen if input dates are equal assertfalse no more than one occurrence of the field result nextposition cfpos status in c the code looks very similar except you use the equivalent c types in java use the constrainfieldandvalue method let fmt be a dateintervalformat for locale en us and skeleton dmmmmy let input1 be july 20 2018 and input2 be august 3 2018 formatteddateinterval result fmt formattovalue input1 input2 assertequals expected output from format july 20 u2013 august 3 2018 result tostring constrainedfieldposition cfpos new constrainedfieldposition cfpos constrainfieldandvalue dateintervalformat spanfield date_interval_span 0 if result nextposition cfpos assertequals expect start index 0 cfpos getstart assertequals expect end index 7 cfpos getlimit else no such span can happen if input dates are equal assertfalse no more than one occurrence of the field result nextposition cfpos a span may cover multiple primitive fields in the above example the span contains both a month and a date using formattedvalue those primitive fields will also be present and you can check their start and end indices to see if they are contained within a desired span back to top 2016 and later unicode inc and others license terms of use http www unicode org copyright html edit this page on github this site uses just the docs a documentation theme for jekyll
|