[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Cloud Natural Language V2 Client - Class TextSpan (1.0.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.1 (latest)](/php/docs/reference/cloud-language/latest/V2.TextSpan)\n- [1.0.0](/php/docs/reference/cloud-language/1.0.0/V2.TextSpan)\n- [0.34.3](/php/docs/reference/cloud-language/0.34.3/V2.TextSpan)\n- [0.33.0](/php/docs/reference/cloud-language/0.33.0/V2.TextSpan)\n- [0.32.7](/php/docs/reference/cloud-language/0.32.7/V2.TextSpan)\n- [0.31.3](/php/docs/reference/cloud-language/0.31.3/V2.TextSpan)\n- [0.30.2](/php/docs/reference/cloud-language/0.30.2/V2.TextSpan)\n- [0.29.0](/php/docs/reference/cloud-language/0.29.0/V2.TextSpan)\n- [0.28.5](/php/docs/reference/cloud-language/0.28.5/V2.TextSpan) \nReference documentation and code samples for the Cloud Natural Language V2 Client class TextSpan.\n\nRepresents a text span in the input document.\n\nGenerated from protobuf message `google.cloud.language.v2.TextSpan`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Language \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getContent\n\nThe content of the text span, which is a substring of the document.\n\n### setContent\n\nThe content of the text span, which is a substring of the document.\n\n### getBeginOffset\n\nThe API calculates the beginning offset of the content in the original\ndocument according to the\n[EncodingType](/php/docs/reference/cloud-language/latest/V2.EncodingType) specified in the API\nrequest.\n\n### setBeginOffset\n\nThe API calculates the beginning offset of the content in the original\ndocument according to the\n[EncodingType](/php/docs/reference/cloud-language/latest/V2.EncodingType) specified in the API\nrequest."]]