CN103034468B - A method and apparatus for displaying text - Google Patents

A method and apparatus for displaying text Download PDF

Info

Publication number
CN103034468B
CN103034468B CN201210551925.6A CN201210551925A CN103034468B CN 103034468 B CN103034468 B CN 103034468B CN 201210551925 A CN201210551925 A CN 201210551925A CN 103034468 B CN103034468 B CN 103034468B
Authority
CN
China
Prior art keywords
characters
number
text
value
character
Prior art date
Application number
CN201210551925.6A
Other languages
Chinese (zh)
Other versions
CN103034468A (en
Inventor
张鹏飞
武小军
林形省
Original Assignee
小米科技有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 小米科技有限责任公司 filed Critical 小米科技有限责任公司
Priority to CN201210551925.6A priority Critical patent/CN103034468B/en
Publication of CN103034468A publication Critical patent/CN103034468A/en
Application granted granted Critical
Publication of CN103034468B publication Critical patent/CN103034468B/en

Links

Abstract

本发明实施例公开了一种显示文本的方法及装置,该方法包括:检测文本的字符数量参数值;当所述字符数量参数值位于预定范围时,显示所述文本的全部字符。 Embodiment of the present invention discloses a method and apparatus for displaying text, the method comprising: detecting the number of characters of the text parameter value; when the parameter value of the character number is located in a predetermined range, displaying all characters of the text. 本发明实施例提供的显示文本的方法及装置,通过检测文本具有的字符数量是否在预定范围,来确定显示文本全部字符,还是显示一部分、隐藏一部分文本字符,减少了处理负荷,灵活显示文本的内容,减少终端和服务器的交互次数,降低成本,提高用户体验。 Method and apparatus for displaying text according to an embodiment of the present invention, the number of characters having by detecting whether the text in a predetermined range, determines the display all of the text character, or part of the display, hide the portion of text characters, to reduce the processing load, a flexible display text content, interactive terminals and reduce the number of servers, reduce costs and improve the user experience.

Description

一种显示文本的方法及装置 A method and apparatus for displaying text

技术领域 FIELD

[0001] 本发明涉及通讯技术领域,尤其涉及一种显示文本的方法及装置。 [0001] The present invention relates to communication technologies, and in particular relates to a method and apparatus for displaying text.

背景技术 Background technique

[0002] 在通讯技术迅速发展的今天,手机已经成为绝大多数人每天工作和生活的必需品。 [0002] In the rapid development of communication technology today, mobile phones have become a daily necessity for the vast majority of people work and live. 利用手机浏览文本,如论坛帖子,是目前流行的方式。 Use your phone's text, such as forum posts, it is a popular way.

[0003]目前,用户花费很多时间在手机浏览内容上,如浏览微博、米吧等。 [0003] Currently, users spend a lot of time on your phone content, such as browsing microblogging, rice bar. 由于使用手机浏览时,帖子逐个依次排列,若贴子内容很长则占用了大量显示空间资源,不利于用户阅读。 Due to the use of mobile browsing, posts one by one in order of priority, if postings very long display space is taking up a lot of resources, it is not conducive to the user to read. 一般的做法是当帖子内容长度超过N行时,只显示N行,剩下的内容隐藏,待点击展开后,再显示全文。 The general practice is when the content of the post longer than N rows, only the N line, the rest of the content hidden until after the click to expand, and then display the full text.

[0004] 然而,在现实使用时往往隐藏的内容只有一两个字符的情况。 [0004] However, in reality often hidden content using only the case of one or two characters. 因此,目前的技术均按照固定阈值隐藏帖子内容。 Therefore, the current technology are hidden message content according to a fixed threshold. 从显示帖子内容的终端角度看,显示隐藏内容时终端需要向服务器获取信息,增加了服务器和终端的交互次数,存在加大成本的问题。 From the angle of the display terminal post content point of view, the terminal needs to obtain information to show hidden content to the server, increasing the number of interactions and terminal servers, problems increase the cost. 从用户角度看,显示隐藏内容需要用户点击操作,缺乏灵活性,存在浪费时间的问题。 From the user point of view, to show hidden content requires the user to click operation, lack of flexibility, there is a problem waste of time.

发明内容 SUMMARY

[0005] 本发明实施例提供了一种显示文本的方法及装置,用以灵活显示文本的内容,减少终端和服务器的交互次数,降低成本,提高用户体验的效果。 Embodiment [0005] The present invention provides a method and apparatus for displaying text, displaying content of the text for a flexible, interactive terminals and reduce the number of servers, to reduce costs, the effect of improving the user experience.

[0006] 本发明实施例提供的一种显示文本的方法,包括: [0006] A method for displaying text according to an embodiment of the present invention, comprising:

[0007] 检测文本的字符数量参数值; Character number of parameters [0007] The text detection value;

[0008] 当所述字符数量参数值位于预定范围时,显示所述文本的全部字符。 [0008] When the number of characters in the parameter value is in a predetermined range, displaying all characters of the text.

[0009] 本发明实施例提供的一种显示文本的装置,包括: [0009] A display apparatus according to an embodiment of the text of the present invention, comprising:

[0010] 检测模块,用于检测文本的字符数量参数值; [0010] The detection module, the parameter value for detecting the number of characters of the text;

[0011] 显示模块,用于当所述字符数量参数值位于预定范围时,显示所述文本的全部字符。 [0011] The display module, configured to, when the number of the character at the predetermined parameter value range, the display all the characters of the text.

[0012] 本发明实施例的有益效果包括: [0012] Advantageous effects of the embodiments of the present invention comprises:

[0013] 本发明实施例提供的显示文本的方法及装置,用于检测文本的字符数量参数值;当所述字符数量参数值位于预定范围时,显示所述文本的全部字符。 [0013] Method and apparatus for displaying text according to an embodiment of the present invention, the number of parameter values ​​for detection of text characters; when the parameter value of the character number a predetermined range, displaying all characters of the text. 本发明实施例提供的显示文本的方法及装置,通过检测文本具有的字符数量是否在预定范围,来确定显示文本全部字符,还是显示一部分、隐藏一部分文本字符。 Method and apparatus for displaying text according to an embodiment of the present invention, having the number of characters by detecting whether the text in a predetermined range, determines the display text characters all or part of the display, the hidden part of the text characters. 这样,可以使字符数大于预定范围第一端点值且小于第二端点值的文本显示全部内容,避免用户点开隐藏内容后,仅出现一两个字符的情况。 After this, it is possible that the number of characters is greater than the predetermined range value and less than a first end of the second text display entirety inclusive, to avoid opening the hidden content users, where only one or two characters appear. 也减少了处理负荷,灵活显示文本的内容,减少终端和服务器的交互次数,降低成本,提高用户体验。 Also reduces the processing load, a flexible display contents of the text, to reduce the number of interactions terminal and a server, reduce costs and improve the user experience.

附图说明 BRIEF DESCRIPTION

[0014] 图1为本发明实施例提供的显示文本的方法流程图; The method of displaying text according to an embodiment of [0014] Figure 1 is a flowchart of the invention;

[0015] 图2为本发明另一实施例提供的显示文本的方法流程图; The method of displaying text according to another embodiment of the [0015] FIG 2 is a flowchart of the invention;

[0016] 图3为本发明另一实施例提供的显示文本的方法流程图; The method of displaying text according to another embodiment of the [0016] FIG. 3 is a flowchart of the invention;

[0017] 图4为本发明实施例提供的视频图像的显示文本的装置虚的拟结构示意图。 Quasi schematic structural diagram of a display device a virtual text [0017] FIG 4 video images according to an embodiment of the present invention.

具体实施方式 Detailed ways

[0018] 下面结合附图,对本发明实施例提供的显示文本的方法及装置的具体实施方式进行详细地说明。 [0018] will be described below in detail in conjunction with the accompanying drawings, specific embodiments of a method and apparatus for displaying text provided by the present invention.

[0019] 本发明实施例提供的显示文本的方法,如图1所示,具体包括以下步骤: [0019] A method for displaying text according to an embodiment of the present invention, shown in Figure 1, includes the following steps:

[0020] 步骤101、检测文本的字符数量参数值; [0020] Step 101, the number of characters of text parameter detection value;

[0021] 步骤102、当字符数量参数值位于预定范围时,显示文本的全部字符。 [0021] Step 102, when the number of characters in the parameter value is located in the predetermined range, displaying all the characters of the text.

[0022] 其中,上述文本主要用于记载和储存文字信息,而不是图像、声音和格式化数据,常见的文本文档的扩展名有.txt、.doc.、.docx、.wps等。 [0022] wherein the above-mentioned text mainly to record and store text messages, the extension instead of the image, sound and data format, the common text documents are .txt, .doc.,. Docx, .wps like.

[0023] 较佳地,在一个实施例中,预定范围由两个端点和两个端点之间的数值构成,预定范围的第一端点值小于预定范围的第二端点值。 [0023] Preferably, in one embodiment, is constituted by a predetermined value range between two endpoints and two endpoints, the first endpoint predetermined range smaller than the second predetermined value range endpoints. 由此,当字符数量参数值小于第一端点值时,显示文本的全部字符;当字符数量参数值大于第二端点值时,显示文本字符数量参数值小于第一端点值的字符部分,隐藏字符数量参数值不小于第一端点值的字符部分。 Accordingly, when the first value is less than the number of characters inclusive, show all characters of text; when the number of characters in the second parameter value is greater than the end value, the display value is less than the number of text characters a character portion of the first end value, hidden characters is not less than the number of parameters of the first end portion of the character value.

[0024] 例如:预定范围为5行至10行,其第一端点值为5、第二端点值为10,当文本的字符数量参数值为4行时,其小于第一端点值5,则显示文本的全部字符;当文本的字符数量参数值为8行时,位于预定范围,则显示文本的全部字符;当文本的字符数量参数值为15行时,大于第二端点值10,显示文本字符数量参数值小于第一端点值的字符部分即第1行至第4行,隐藏字符数量参数值不小于第一端点值的字符部分即第5行至第15行。 [0024] For example: the predetermined range is row 5 to row 10, which is a first end 5, a second end 10 is, when the number of characters of the text parameter is row 4, which is smaller than a first value end 5 , all the characters of the text is displayed; if the number of characters of the text parameter row value is 8, a predetermined range, all the characters of the text is displayed; if the second number of parameters inclusive character of text is 15 rows, greater than 10, the number of text characters a character portion of the first value is less than inclusive, i.e., line 1 to line 4, the number of characters in the character portion hidden parameter value smaller than the first end value, i.e., line 5 to line 15.

[0025] 较佳地,在一个实施例中,接收到更新预定范围指令后,根据输入的数值更新预定范围。 [0025] Preferably, in one embodiment, the predetermined range after receiving the update instruction, the update range in accordance with the predetermined input value. 预定范围可以进行更新修改,例如,将预定范围由5行至10行修改更新为7行至10行。 Updating the predetermined range may be modified, e.g., to modify the predetermined range of 7 to update the row to row 5, line 10 to line 10. 用户在操作时,通过点击修改预定范围的选项,显示出修改预定范围的界面,该界面上可以具有范围输入框,通过用户自行输入数值;也可以具有范围值预定选项,便于用户在多个选项中直接选择输入数值。 In operation the user, by clicking the option to modify the predetermined range, the predetermined range showing modified interface, this interface may have a range of input box, the user inputs the value by themselves; the predetermined value may have a range of options, the plurality of user-friendly options of the input data directly. 待确定输入数值后,向终端(如手机、电脑等)的处理器发送更新预定范围指令,终端再根据输入的数值更新预定范围。 After determining the value input to the terminal (e.g., mobile phones, computers, etc.) the processor sends a command to update the predetermined range, then the terminal updates a predetermined range in accordance with the input value.

[0026] 较佳地,在一个实施例中,当字符数量参数值为字符行数时,检测文本的字符数量参数值,包括:逐行扫描文本的每行是否具有字符;若具有字符,则累计文本的字符数量参数值加一;若不具有字符,则检测完毕。 [0026] Preferably, in one embodiment, when the number of characters in the parameter value is the number of lines of characters, the number of detected parameter values ​​of text characters, comprising embodiments: progressive scan each line of text characters whether; if having characters, total number of characters of text parameter value plus one; if having characters, the testing is completed.

[0027] 较佳地,在一个实施例中,当字符数量参数值为字符个数时,检测文本的字符数量参数值,包括:按照从上到下、从左到右的顺序逐个扫描文本的当前字符位是否具有字符;若具有字符,则累计文本的字符数量参数值加一;若不具有字符,则检测完毕。 [0027] Preferably, in one embodiment, when the number of characters in the parameter value is the number of characters, the parameter value detected number of characters of the text, comprising: from top to bottom, left to right individual scans the text whether the current character position character; if having characters, the total number of characters plus the value of a parameter of the text; if having characters, the testing is completed.

[0028] 通过上述描述可以看出,本发明实施例提供的显示文本的方法,通过检测文本具有的字符数量是否在预定范围,来确定显示文本全部字符,还是显示一部分、隐藏一部分文本字符。 [0028] As can be seen from the above description, the text display according to an embodiment of the method of the present invention, having the number of characters by detecting whether the text in a predetermined range, determines the display text characters all or part of the display, the hidden part of the text characters. 这样,可以使字符数大于预定范围第一端点值且小于第二端点值的文本显示全部内容,避免用户点开隐藏内容后,仅出现一两个字符的情况。 After this, it is possible that the number of characters is greater than the predetermined range value and less than a first end of the second text display entirety inclusive, to avoid opening the hidden content users, where only one or two characters appear. 也减少了处理负荷,灵活显示文本的内容,减少终端和服务器的交互次数,降低成本,提高用户体验。 Also reduces the processing load, a flexible display contents of the text, to reduce the number of interactions terminal and a server, reduce costs and improve the user experience.

[0029] 预定范围由两个端点和两个端点之间的数值构成,预定范围的第一端点值小于预定范围的第二端点值。 [0029] composed of a predetermined range of values ​​between the two endpoints and two endpoints, the first endpoint predetermined range smaller than the second predetermined value range endpoints. 当文字字符数量参数值为文字字符行数时,假设第一端点值为6、第二端点值为12,如图2所示,本发明实施例提供的方法,包括以下步骤: When the value of the number of characters of text characters in a line of text the number of parameters, assuming that the first end is 6, the second end 12 is shown in Figure 2, the method provided by the embodiment of the present invention, comprising the steps of:

[0030] 步骤201、获取需要展示的文本;例如论坛中预发布的帖子等文本。 [0030] In step 201, to get the text to be presented; for example, forum posts and other pre-release version.

[0031] 步骤202、逐行扫描文本的每行是否具有字符;若具有字符,则执行步骤203 ;否贝1J,检测完毕,执行步骤204; [0031] Step 202, progressive scan each line of text characters whether; if the character has, proceed to step 203; NO shellfish 1J, testing has been completed, step 204 is executed;

[0032] 步骤203、累计文本的文字字符行数加一,执行步骤202 ; [0032] Step 203, the cumulative number of lines of characters of text characters plus one, step 202 is performed;

[0033] 步骤204、获取文本的字符行数,以及预定范围; [0033] Step 204, the number of lines of characters of text acquired, and the predetermined range;

[0034] 步骤205、判断字符行数是否位于预定范围内,若位于,执行步骤206 ;否则,执行步骤207 ; [0034] Step 205, it is determined whether the number of lines of characters within a predetermined range, if it is located, step 206 is executed; otherwise, step 207 is executed;

[0035] 步骤206、显示文本的全部文字字符。 [0035] Step 206, show the full text characters of text.

[0036] 步骤207、判断字符行数与预定范围的端点值的大小关系;当字符行数小于第一端点值6时,执行步骤206 ;当文字字符行数大于第二端点值12时,执行步骤208 ; [0036] Step 207, the endpoint determines the size relationship of the predetermined value of the number of lines of characters of the range; when the number of lines of characters smaller than the first 6 inclusive, step 206 is performed; when the number of characters in the character line is greater than a second 12 inclusive, performing step 208;

[0037] 步骤208、文字显示第1行至第5行的内容,隐藏文本5行以后的内容。 [0037] Step 208, the contents of the text display row 1 to row 5, line 5 after the hidden text content.

[0038] 通过本实施例的描述可以看出,本发明实施例提供的方法,通过检测文本具有的字符数量是否在预定范围,来确定显示文本全部字符,还是显示一部分、隐藏一部分文本字符。 [0038] It can be seen from the description of the present embodiment, a method according to an embodiment of the present invention, having the number of characters by detecting whether the text in a predetermined range, determines the display text characters all or part of the display, the hidden part of the text characters. 这样,可以使字符数大于预定范围第一端点值且小于第二端点值的文本显示全部内容,避免用户点开隐藏内容后,仅出现一两个字符的情况。 After this, it is possible that the number of characters is greater than the predetermined range value and less than a first end of the second text display entirety inclusive, to avoid opening the hidden content users, where only one or two characters appear. 也减少了处理负荷,灵活显示文本的内容,减少终端和服务器的交互次数,降低成本,提高用户体验。 Also reduces the processing load, a flexible display contents of the text, to reduce the number of interactions terminal and a server, reduce costs and improve the user experience.

[0039] 预定范围由两个端点和两个端点之间的数值构成,预定范围的第一端点值小于预定范围的第二端点值。 [0039] composed of a predetermined range of values ​​between the two endpoints and two endpoints, the first endpoint predetermined range smaller than the second predetermined value range endpoints. 当字符数量参数值为字符个数时,假设第一端点值为70、第二端点值为90,如图3所示,本发明实施例提供的方法,包括以下步骤: When the number of characters parameter is the number of characters, it is assumed that the first end 70, second end 90 is shown in Figure 3, the method according to an embodiment of the present invention, comprising the steps of:

[0040] 步骤301、获取需要展示的文本; [0040] Step 301, to get the text to be presented;

[0041] 步骤302、按照从上到下、从左到右的顺序逐个扫描文本的当前字符位是否具有字符;若具有字符,则执行步骤303 ;否则,检测完毕,执行步骤304 ; [0041] Step 302, from top to bottom, left to right order bits of the current character by one character whether the scanned text; if the character has, step 303 is executed; otherwise, the detection is completed, step 304 is performed;

[0042] 步骤303、累计文本的字符个数加一,执行步骤302 ; [0042] Step 303, the cumulative number of characters of the text by one, step 302 is performed;

[0043] 步骤304、获取文本的字符个数,以及预定范围; [0043] Step 304, the number of characters of the text acquired, and the predetermined range;

[0044] 步骤305、判断字符个数是否位于预定范围内,若位于,执行步骤306 ;否则,执行步骤307 ; [0044] Step 305, it is determined whether or not the number of characters within a predetermined range, if it is located, step 306 is executed; otherwise, step 307 is executed;

[0045] 步骤306、显示文本的全部字符。 [0045] Step 306, the display all the characters of the text.

[0046] 步骤307、判断字符个数与预定范围的端点值的大小关系;当字符个数小于第一端点值70时,执行步骤306 ;当字符个数大于第二端点值90时,执行步骤308 ; [0046] Step 307 determines the number of characters and the end value of the predetermined range magnitude relation; when the number of characters smaller than the first 70 inclusive, step 306 is performed; when the number of characters is greater than the second 90 inclusive, performed step 308;

[0047] 步骤308、显示字符1至字符70的内容,隐藏字符70以后的内容。 [0047] Step 308, the display content of the character 1 to 70 characters, 70 characters after the hidden content.

[0048] 通过本实施例的描述可以看出,本发明实施例提供的方法,通过检测文本具有的字符数量是否在预定范围,来确定显示文本全部字符,还是显示一部分、隐藏一部分文本字符。 [0048] It can be seen from the description of the present embodiment, a method according to an embodiment of the present invention, having the number of characters by detecting whether the text in a predetermined range, determines the display text characters all or part of the display, the hidden part of the text characters. 这样,可以使字符数大于预定范围第一端点值且小于第二端点值的文本显示全部内容,避免用户点开隐藏内容后,仅出现一两个字符的情况。 After this, it is possible that the number of characters is greater than the predetermined range value and less than a first end of the second text display entirety inclusive, to avoid opening the hidden content users, where only one or two characters appear. 也减少了处理负荷,灵活显示文本的内容,减少终端和服务器的交互次数,降低成本,提高用户体验。 Also reduces the processing load, a flexible display contents of the text, to reduce the number of interactions terminal and a server, reduce costs and improve the user experience.

[0049] 基于同一发明构思,本发明实施例还提供了一种显示文本的装置,由于该装置解决问题的原理与前述一种显示文本的方法相似,因此该装置的实施可以参见方法的实施,重复之处不再赘述。 [0049] Based on the same inventive concept, an embodiment of the present invention further provides an apparatus for displaying text, since the means to solve the problem with the principle of a display method similar text, implementation of the apparatus can see the implementation of the method, repeat the Department will not be repeated.

[0050] 本发明实施例提供的一种显示文本的装置,如图4所示,包括: [0050] A display apparatus according to an embodiment of the text of the present invention, as shown in Fig 4, comprising:

[0051] 检测模块401,用于检测文本的字符数量参数值; [0051] The detection module 401, the parameter value for detecting the number of characters of the text;

[0052] 显示模块402,用于当字符数量参数值位于预定范围时,显示文本的全部字符。 [0052] The display module 402, when the number of parameter values ​​for a predetermined range of characters, all characters of the text display.

[0053] 较佳地,当字符数量参数值小于第一端点值时,显示模块402显示文本的全部字符;当字符数量参数值大于所述第二端点值时,显示模块显示402文本字符数量参数值小于第一端点值的字符部分,隐藏字符数量参数值不小于第一端点值的字符部分;其中,预定范围由两个端点和两个端点之间的数值构成,预定范围的第一端点值小于预定范围的第二端点值。 [0053] Preferably, when the number of characters in the parameter value smaller than the first end, the display 402 displays all characters of the text block; when the parameter value is greater than the number of characters in the second endpoint value, the display module 402 displays the number of text characters value is less than the character portion of the first end value, the hidden characters in the parameter values ​​is not less than the number of characters of the first portion, inclusive; wherein the predetermined range is constituted by two end points and the values ​​between the two endpoints, the first predetermined range an end point value less than the predetermined value range of the second end.

[0054] 较佳地,该装置还包括: [0054] Preferably, the apparatus further comprising:

[0055] 更新模块403,用于接收到更新预定范围指令后,根据输入的数值更新预定范围。 [0055] The updating module 403, after receiving a command to update the predetermined range, the predetermined range value is updated according to the input.

[0056] 较佳地,当字符数量参数值为字符行数时,检测模块401逐行扫描文本的每行是否具有字符;若具有字符,则累计文本的字符数量参数值加一;若不具有字符,则检测完毕。 [0056] Preferably, when the number of characters in the parameter value is the number of lines of characters per line progressive scanning module 401 detects whether text characters; if having characters, the total number of characters plus the value of a parameter of the text; if having character, the testing is completed.

[0057] 较佳地,当字符数量参数值为字符个数时,检测模块401按照从上到下、从左到右的顺序逐个扫描文本的当前字符位是否具有字符;若具有字符,则累计所述文本的字符数量参数值加一;若不具有字符,则检测完毕。 [0057] Preferably, when the number of characters in the parameter value is the number of characters, the detection module 401 from top to bottom, left to right order bits of the current character by one character whether the scanned text; if the character has, the accumulated number of characters of the text parameter value plus one; if having characters, the testing is completed.

[0058] 通过上述描述可知,本发明实施例提供的显示文本的方法及装置,通过检测文本具有的字符数量是否在预定范围,来确定显示文本全部字符,还是显示一部分、隐藏一部分文本字符。 [0058] apparent from the above description, a method and apparatus for displaying text according to an embodiment of the present invention, having the number of characters by detecting whether the text in a predetermined range, determines the display text characters all or part of the display, the hidden part of the text characters. 这样,可以使字符数大于预定范围第一端点值且小于第二端点值的文本显示全部内容,避免用户点开隐藏内容后,仅出现一两个字符的情况。 After this, it is possible that the number of characters is greater than the predetermined range value and less than a first end of the second text display entirety inclusive, to avoid opening the hidden content users, where only one or two characters appear. 也减少了处理负荷,灵活显示文本的内容,减少终端和服务器的交互次数,降低成本,提高用户体验。 Also reduces the processing load, a flexible display contents of the text, to reduce the number of interactions terminal and a server, reduce costs and improve the user experience.

[0059] 通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明实施例可以通过硬件实现,也可以借助软件加必要的通用硬件平台的方式来实现。 [0059] By the above described embodiments, those skilled in the art may clearly understand that embodiments of the present invention may be implemented by hardware, may also be implemented by software plus a necessary universal hardware platform. 基于这样的理解,本发明实施例的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。 Based on such understanding, the technical solutions of the present invention embodiments may be embodied in a software product, the software product may be stored in a nonvolatile storage medium (such as CD-ROM, U disk, mobile hard disk), and it includes several instructions that enable a computer device (may be a personal computer, a server, or network device) to execute the methods according to embodiments of the present invention.

[0060] 本领域技术人员可以理解附图只是一个优选实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。 [0060] Those skilled in the art will be appreciated the drawings are merely schematic diagram of a preferred embodiment, the modules or processes in the accompanying drawings are not necessarily embodiments of the present invention it is necessary.

[0061] 本领域技术人员可以理解实施例中的装置中的模块可以按照实施例描述进行分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。 [0061] Those skilled in the art will be appreciated apparatus embodiment that the modules can be distributed to the embodiment of the device according to the embodiment may be performed according to the present embodiment which are different from one case or more devices. 上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。 Modules of the embodiments may be combined into one module, or split into multiple submodules.

[0062] 上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。 Embodiment [0062] The present invention No. merely for description, the embodiments do not represent the merits embodiment.

[0063] 显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。 [0063] Obviously, those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. 这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 Thus, if these modifications and variations of the present invention fall within the claims of the invention and the scope of equivalents thereof, the present invention intends to include these modifications and variations.

Claims (8)

1.一种显示文本的方法,其特征在于,包括: 检测文本的字符数量参数值; 当所述字符数量参数值位于预定范围时,显示所述文本的全部字符; 其中,所述预定范围由两个端点和两个端点之间的数值构成,所述预定范围的第一端点值小于所述预定范围的第二端点值;所述方法还包括:当所述字符数量参数值小于所述第一端点值时,显示所述文本的全部字符;当所述字符数量参数值大于所述第二端点值时,显示所述文本字符数量参数值小于所述第一端点值的字符部分,隐藏所述字符数量参数值不小于所述第一端点值的字符部分。 A method for displaying text, characterized by comprising: detecting the number of characters of the text parameter value; when the parameter value of the character number is located in a predetermined range, all the characters of the text display; wherein said predetermined range of value between two endpoints and two end points, and the first end of said predetermined range of values ​​less than the predetermined value range of the second end; said method further comprising: when the value is less than the number of characters a first end value, displaying all the characters of the text; when the parameter value is greater than the number of characters in the second endpoint value, displaying the text character value is less than the number of characters in the first end portion of the value , the number of hidden parameters of the character is not smaller than the value of the end portion of the first character.
2.根据权利要求1所述的方法,其特征在于,所述方法还包括: 接收到更新预定范围指令后,根据输入的数值更新所述预定范围。 2. The method according to claim 1, wherein said method further comprises: after receiving the update command a predetermined range, said predetermined value is updated according to the input range.
3.根据权利要求1所述的方法,其特征在于,当所述字符数量参数值为字符行数时,所述检测文本的字符数量参数值,包括: 逐行扫描所述文本的每行是否具有字符; 若具有字符,则累计所述文本的字符数量参数值加一; 若不具有字符,则检测完毕。 3. The method according to claim 1, wherein, when the number of characters in the character parameter is the number of rows, the number of detected parameter values ​​of characters of the text, comprising: progressive scanning each line of the text if having a character; if the character has, the accumulated number of characters of the text parameter value plus one; if having characters, the testing is completed.
4.根据权利要求1所述的方法,其特征在于,当所述字符数量参数值为字符个数时,所述检测文本的字符数量参数值,包括: 按照从上到下、从左到右的顺序逐个扫描所述文本的当前字符位是否具有字符; 若具有字符,则累计所述文本的字符数量参数值加一; 若不具有字符,则检测完毕。 4. The method according to claim 1, wherein, when the number of characters in the parameter value is the number of characters, the number of detected parameter values ​​of characters of the text, comprising: a top-bottom and left to right sequential scanning of the current character by one bit whether text characters; if the character has, the accumulated number of characters of the text parameter value plus one; if having characters, the testing is completed.
5.一种显示文本的装置,其特征在于,包括: 检测模块,用于检测文本的字符数量参数值; 显示模块,用于当所述字符数量参数值位于预定范围时,显示所述文本的全部字符;其中,当所述字符数量参数值小于第一端点值时,所述显示模块显示所述文本的全部字符;当所述字符数量参数值大于第二端点值时,所述显示模块显示所述文本字符数量参数值小于所述第一端点值的字符部分,隐藏所述字符数量参数值不小于所述第一端点值的字符部分;其中,所述预定范围由两个端点和两个端点之间的数值构成,所述预定范围的第一端点值小于所述预定范围的第二端点值。 A text display apparatus, wherein comprising: a detection means for detecting the number of characters of the text parameter values; the display module, configured to, when the number of the character at the predetermined parameter value range, the display of the text all characters; wherein, when the number of the character parameter value smaller than the first end, the display module displays all characters of the text; when the parameter value is greater than the number of characters of the second end value, the display module displaying the text character value is less than the number of characters in the first portion of the end value, the number of hidden parameters of the character is not smaller than the first end portion of a character value; wherein said predetermined range defined by two endpoints and the values ​​between the two endpoints, and the first end of said predetermined range of values ​​less than the predetermined value range of the second end.
6.根据权利要求5所述的装置,其特征在于,所述装置还包括: 更新模块,用于接收到更新预定范围指令后,根据输入的数值更新所述预定范围。 6. The apparatus according to claim 5, characterized in that said apparatus further comprises: an updating module, for updating the predetermined range after receiving the instruction, updates the value of the predetermined range in accordance with the input.
7.根据权利要求5所述的装置,其特征在于,当所述字符数量参数值为字符行数时,所述检测模块逐行扫描所述文本的每行是否具有字符;若具有字符,则累计所述文本的字符数量参数值加一;若不具有字符,则检测完毕。 7. The apparatus as claimed in claim 5, wherein, when the number of characters in the character parameter is the number of rows, each row block of the detection of the progressive scanning whether text characters; if having characters, total number of characters of the text parameter value plus one; if having characters, the testing is completed.
8.根据权利要求5所述的装置,其特征在于,当所述字符数量参数值为字符个数时,所述检测模块按照从上到下、从左到右的顺序逐个扫描所述文本的当前字符位是否具有字符;若具有字符,则累计所述文本的字符数量参数值加一;若不具有字符,则检测完毕。 8. The device as claimed in claim 5, wherein, when the number of characters in the parameter value is the number of characters, the detecting module from top to bottom, left to right by one scan of the text whether the current character position character; if the character has, the accumulated number of characters of the text parameter value plus one; if having characters, the testing is completed.
CN201210551925.6A 2012-12-18 2012-12-18 A method and apparatus for displaying text CN103034468B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210551925.6A CN103034468B (en) 2012-12-18 2012-12-18 A method and apparatus for displaying text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210551925.6A CN103034468B (en) 2012-12-18 2012-12-18 A method and apparatus for displaying text

Publications (2)

Publication Number Publication Date
CN103034468A CN103034468A (en) 2013-04-10
CN103034468B true CN103034468B (en) 2016-02-24

Family

ID=48021398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210551925.6A CN103034468B (en) 2012-12-18 2012-12-18 A method and apparatus for displaying text

Country Status (1)

Country Link
CN (1) CN103034468B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002062792A (en) * 2000-08-21 2002-02-28 Akio Toshima Memory study system
CN101305336A (en) * 2005-11-14 2008-11-12 Oz通信公司 Context sensitive concealment of an input field
CN101727275A (en) * 2006-09-06 2010-06-09 苹果公司 Portable electronic device, method, and graphical user interface for displaying structured electronic documents
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN102646089A (en) * 2011-02-16 2012-08-22 汉王科技股份有限公司 Text hiding and displaying method and device for electronic reader

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002062792A (en) * 2000-08-21 2002-02-28 Akio Toshima Memory study system
CN101305336A (en) * 2005-11-14 2008-11-12 Oz通信公司 Context sensitive concealment of an input field
CN101727275A (en) * 2006-09-06 2010-06-09 苹果公司 Portable electronic device, method, and graphical user interface for displaying structured electronic documents
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN102646089A (en) * 2011-02-16 2012-08-22 汉王科技股份有限公司 Text hiding and displaying method and device for electronic reader

Also Published As

Publication number Publication date
CN103034468A (en) 2013-04-10

Similar Documents

Publication Publication Date Title
US20090285444A1 (en) Web-Based Content Detection in Images, Extraction and Recognition
CN102902761B (en) Cross-terminal cloud browse method and system
US20120110470A1 (en) Touch-based system for transferring data
JP2012527677A (en) Method of generating a graphic object with the desired physical characteristics for use in animation, apparatus and computer program products
CN102474510A (en) Selectively distributing updates of changing images to client devices
CN101461175A (en) System and method for using a visual password scheme
CN102317949A (en) Authentication device, authentication method, and program to execute same by computer
US8700991B1 (en) Protecting content presented in a web browser
CN101894168B (en) Method and system for layout display of web page of mobile terminal
US9027122B2 (en) Isolation tool for user assistance in solving a captcha test
US9509790B2 (en) Global presence
CN101743529A (en) The portable information terminal
CN106375191A (en) News feed techniques
EP2965229A1 (en) Automatic alignment of a multi-dimensional layout
CN102792254B (en) A method for providing a virtual background content of the key input means and systems
CN103078745A (en) Logon authentication code based on picture
CN104077183A (en) Reminding and operating method and device for reading of new software message
CN102263705B (en) Show chat message method and apparatus
US20140324757A1 (en) Expert answer platform methods, apparatuses and media
CN103425416B (en) Display control method and apparatus for a portable device
US20110298691A1 (en) Flexible Display Security CAPTCHA Bends
JP2013539875A (en) Branded browser frame
KR20130108285A (en) Drag-able tabs
US9021507B2 (en) Dynamic use of data across multiple programs
WO2014186489A2 (en) Enhanced links in curation and collaboration applications

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C53 Correction of patent for invention or patent application
C53 Correction of patent for invention or patent application
C14 Grant of patent or utility model